I am new to VBA and just started learning on my own. When I try to run my program...
Sub cpy()
range("k1:k12").Select
Selection.copy
Application.Goto Worksheets("Sheet1").range("m4").Select
ActiveSheet.Paste
End Sub
... I get the following error: Unable to get the selected property of the range class
.
So I tried to run the erroring line separately:
Sub cck()
Application.Goto Worksheets("Sheet1").range("m4").Value
End Sub
It shows the following error: Run-time error '1004': Reference isn't valid
.
The Excel file is new, contains 3 sheets and the sheet names are not altered. I tried to run the above codes on Sheet3.