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
 
Back
Top