Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello!
I have the following code within an addin: ThisWorkbook.Sheets("Sheet1").Range("A1").Copy ThisWorkbook.Sheets("Sheet2").Range("B2").PasteSpe cial _ xlPasteValues, skipblanks:=true Running this with at least one visible workbook open works fine, but if no workbooks are open I get a run time error 'Method PasteSpecial of object Range failed' on the second line. This alternative line work fine however: ThisWorkbook.Sheets("Sheet1").Range("A1").Copy _ Destination:=ThisWorkbook.Sheets("Sheet2").Range(" B2") Unfortunately I need to use the skipblanks and transpose options, so need to use pastespecial. Any ideas? Cheers, Dave |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pasting on Filtered Data Sheets without pasting onto hidden cells | Excel Discussion (Misc queries) | |||
Pasting numbers and formulas without pasting format. | Excel Discussion (Misc queries) | |||
Remove Excel AddIn from AddIn List !! Help | Excel Programming | |||
AddIn | Excel Programming | |||
AddIn | Excel Programming |