Error Message in VB

  • Thread starter Thread starter Katie
  • Start date Start date
K

Katie

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.
 
If Not rng Is Nothing Then
sh.Range("A1").Copy
rng.PasteSpecial Paste:=xlValues, _
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End if
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top