Microsoft KB Archive/199953

= XL2000: Macro Error Running Recorded Paste Commands =

Article ID: 199953

Article Last Modified on 9/25/2003

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition

-



This article was previously published under Q199953



SYMPTOMS
When you run a recorded macro that contains copy and paste commands, you may receive the following error message:

Microsoft Visual Basic

Run-time error '1004': Paste method of Worksheet class failed



CAUSE
This error message occurs when you do the following:
 * You start the macro recorder and you cut or copy items.

-and-
 * You paste using the Clipboard toolbar.



WORKAROUND
When recording macros, do not use the Clipboard toolbar to cut, copy or paste items. Instead use the Cut, Copy and Paste buttons on the Standard toolbar or the Edit menu.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
When you perform multiple copy commands in any of the Microsoft Office programs, the Clipboard toolbar appears, allowing you to collect and paste multiple items stored in the toolbar. For example, you can copy a chart in Excel, switch to Microsoft Word and copy text, and then switch to Microsoft PowerPoint and paste all of the collected (cut or copied) items from the Office Clipboard.

However, because the Office Clipboard is not included in the Visual Basic for Applications object model, it is not a programmable object in Excel. Therefore, the macro recorder does not recognize actions performed with the Office Clipboard.

