Paste Special won't work in VBA
I tried that, Tom, especially since it worked that way from a right
clickPaste SpecialFormats. But in VBA, even as recorded, I got formats
but not the column widths. That's why I put it in separately. Then I kept
getting "Paste Special method of range class failed" errors.
The Paste:=8 worked for widths. But I had pasted Values first, and it
overwrote my values! Okay, so I change things around and do the values
last. *sigh*
Ed
"Tom Ogilvy" wrote in message
...
True, but to add a thought:
Cells.Copy
then
Range("A1").PasteSpecial xlFormats
should paste column widths and row heights as well since entire
columns/rows
are being pasted.
so pasting column widths should be redundant.
--
Regards,
Tom Ogilvy
"Jim Rech" wrote in message
...
There was a problem with xlColumnWidths in Excel 2000. Instead try
this:
PasteSpecial Paste:=8
--
Jim Rech
Excel MVP
|