Macro Error After PASTE() Function in Excel

Last reviewed: September 2, 1997
Article 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 3.00 4.0 4.00 5.0 5.00
Keywords : kbmacro kbprg


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.