Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another "1004" error...

Status
Not open for further replies.

BluByU

IS-IT--Management
Jul 29, 2003
35
0
0
US
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
 
There is no Destination named argument to the Worksheet.Copy method ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
DOH! Thanks.

This is what I ended up doing:

ActiveWorkbook.Worksheets("Sheet1").Range("A5:CZ500").Copy Destination:=objNewWS.Range("A5")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top