XL2000: "PasteSpecial method of Range class failed" Error When Running a Macro (231090)
The information in this article applies to:
This article was previously published under Q231090 SYMPTOMS
When you run a macro that contains the xlColumnWidths member, you receive the following error message:
Run-time error '1004':
PasteSpecial method of Range class failed"
CAUSE
This error message occurs when the following conditions are true:
WORKAROUND
To work around this problem use the number 8 in place of the xlColumnWidths value. The number 8 represents the Column Widths paste constant which is part of Microsoft Excel. The following example illustrates this:
Change this code
Selection.PasteSpecial Paste:=xlColumnWidths
to this:
Selection.PasteSpecial Paste:=8
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbbug kbdtacode kberrmsg kbpending KB231090 |
---|
|