Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to copy down some header text, clear out a spreadsheet, and
then paste the headers back in. I can't get it to work. Anyone see a problem with... ' copy down the headers we have in the user area sheet.Range("A3:AZ3").Copy ' clear out anything that used to be in the sheet sheet.Range("A3:IV5000").ClearContents sheet.Range("A3:IV5000").ClearComments sheet.Range("A3:IV5000").Borders.LineStyle = xlNone ' paste the headers back in sheet.Paste sheet.Range("A3:AZ3") If the range is empty, the user is presented with an error stating that the Paste method failed. If it is not empty, they are instead presented with the "Data on the Clipboard is not the same size and shape...". Anyone know how to do this reliably without user intervention? Maury |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel VBA Paste of Range with PrefixCharacter fails from VB.NET | Excel Discussion (Misc queries) | |||
Why Copy/Paste fails using Offset & Resize of myRange? | Excel Discussion (Misc queries) | |||
Copy paste code fails | Excel Programming | |||
Paste method fails in VBA | Excel Programming | |||
Filter Copy/Paste Fails - Two Ranges Selected? | Excel Programming |