Macro Error After PASTE() Function in Excel

ID: Q68409


The information in this article applies to:
  • Microsoft Excel for Windows, versions 3.0, 4.0, 5.0


SUMMARY

A macro error will occur if a PASTE() function is executed, preceded by a COPY() and a DIALOG.BOX() function, respectively. (Note: this is also true for version 5.0 macro sheets, but not modules.)


MORE INFORMATION

Anytime a DIALOG.BOX() function is placed between a COPY() and a PASTE() function, the macro will halt at the PASTE() function with a macro error. The following macro will halt at line A7:


   A1:     Sample_Macro
   A2:     =SELECT(!A1:D10)
   A3:     =COPY()
   A4:     =NEW()
   A5:     =DIALOG.BOX(box)
   A6:     =SELECT(!A1)
   A7:     =PASTE()
   A8:     =RETURN() 
Executing the DIALOG.BOX() function causes the contents of the Clipboard to disappear. To correct the problem, execute the DIALOG.BOX() function before the COPY() function.


STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Additional query words: 3.0 4.0 5.0

Keywords : kbmacro kbprg
Version : WINDOWS:3.0,4.0,5.0
Platform : WINDOWS
Issue type :


Last Reviewed: October 18, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.