ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error Message in VB (https://www.excelbanter.com/excel-programming/292305-error-message-vbulletin.html)

Katie[_2_]

Error Message in VB
 
I set up a macro to do the following:

If Not rng Is Nothing Then sh.Range("A1").Copy
Destination:=rng
Selection.PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

....and it gives me error message 1004. Could you please
tell me what's wrong with the above script? Thank you.

Tom Ogilvy

Error Message in VB
 
If Not rng Is Nothing Then
sh.Range("A1").Copy
rng.PasteSpecial Paste:=xlValues, _
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End if

--
Regards,
Tom Ogilvy

"Katie" wrote in message
...
I set up a macro to do the following:

If Not rng Is Nothing Then sh.Range("A1").Copy
Destination:=rng
Selection.PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

...and it gives me error message 1004. Could you please
tell me what's wrong with the above script? Thank you.





All times are GMT +1. The time now is 08:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com