XL5: PasteSpecial Method (Range Object) Example IncorrectLast reviewed: September 12, 1996Article ID: Q124090 |
The information in this article applies to:
SYMPTOMSIn Microsoft Excel 5.0, in Visual Basic Reference Help, the example for the PasteSpecial Method (Range Object), returns the following error message when you use it in a procedure:
Run-time Error 1004: PasteSpecial method of Range class failedNOTE: Page 486 of the Microsoft Press book "Microsoft Excel 5 Visual Basic for Applications Reference," contains the same incorrect example.
CAUSEThis error occurs because the "add" argument in the PasteSpecial command is incorrect. The correct argument is "xlAdd."
RESOLUTIONWhen you use this example in a macro, replace the word "Add" in the PasteSpecial command with the word "xlAdd," as in the following example:
Range("D1:D5").PasteSpecial operation:=xlAdd STATUSMicrosoft has confirmed this to be a problem in Microsoft Excel version 5.0. This problem has been corrected in Microsoft Excel version 5.0c.
|
KBCategory: kbprg kbcode kbdocerr
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |