I wrote a macro, inter alia containing the following code:
Const constName = "JCMail.xls"
Const constPre = "JC"
Private Sub CommandButton1_Click()
' Application.ScreenUpdating = False
' Gets and Inserts job card number
Range("AB3").Select
' CommandButton1.Deactivate
varRef = ActiveCell.Value
copier
End Sub
Private Sub copier()
' Copies and pastes date
Windows(constName).Activate
Range("G3").Select
When the macro reaches the last line of code (Range("G3").Select), I get the
following error message:
Run-time Error 1004:
Select method of Range class failed
I have used the exact phrase in so many other macros, and it has always
worked. Why can't I do it here? I use this macro to copy info from one
sheet to another (in this case from an input sheet into a jobcard).
Bookmarks