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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying Excel Worksheets 1

Status
Not open for further replies.

ParaTrooper

Technical User
Feb 5, 2002
16
US
I am trying to write a macro that copies the current Worksheet(s) in a Workbook, to another Workbook.

So far I have to following:

Workbooks(1).Worksheets("Monday").Copy
Set NewSheet = Workbooks("Roster July 2002.xls").Worksheets.Add


This seems to Copy the "Monday" worksheet to a new Workbook, not the "Roster July 2002.xls" workbook.

Thanks in advance,
ParaTrooper.
 
Try
Sheets("Monday").Copy Before:=Workbooks("Roster July 2002.xls").Sheets(1)

This line of code does assume that "Roster July 2002.xls" is open at the time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top