G
Guest
I have the following code (copied from a macro) into VB as follows:
Private Sub CommandButton1_Click()
Sheets("Sheet1").Select
Range("B5
17").Select
Selection.Copy
Sheets("Sheet3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("K22").Select
End Sub
When I run this from a button I get the following message - Runtime error 1004
Select method of Range class failed.
Can someone please help me with the proper syntax.
Thanks
Nigel
Private Sub CommandButton1_Click()
Sheets("Sheet1").Select
Range("B5
![Big Grin :D :D](/styles/default/custom/smilies/grin.gif)
Selection.Copy
Sheets("Sheet3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("K22").Select
End Sub
When I run this from a button I get the following message - Runtime error 1004
Select method of Range class failed.
Can someone please help me with the proper syntax.
Thanks
Nigel