Hello.
I am getting the "1004" error when I try to copy an active worksheet to a new one I just created. Any ideas on what I am doing wrong? Thanks!
Dim objNewWS As Excel.Worksheet
If chkSheet = True Then
Set objNewWS = Worksheets.Add
objNewWS.Move , Worksheets("Sheet3")
ActiveWorkbook.Worksheets("Sheet1").Activate
ActiveWorkbook.Worksheets("Sheet1").Copy Destination:=objNewWS <-- Causes the "1004" error
End If
I am getting the "1004" error when I try to copy an active worksheet to a new one I just created. Any ideas on what I am doing wrong? Thanks!
Dim objNewWS As Excel.Worksheet
If chkSheet = True Then
Set objNewWS = Worksheets.Add
objNewWS.Move , Worksheets("Sheet3")
ActiveWorkbook.Worksheets("Sheet1").Activate
ActiveWorkbook.Worksheets("Sheet1").Copy Destination:=objNewWS <-- Causes the "1004" error
End If