Microsoft KB Archive/68409

= Macro Error After PASTE Function in Excel =

Article ID: 68409

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Excel 3.0 Standard Edition
 * Microsoft Excel 4.0 Standard Edition
 * Microsoft Excel 5.0 Standard Edition

-



This article was previously published under Q68409



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 kbprogramming KB68409

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.