macro to copy workbook with several worheets

C

CC

I've try make a macro to copy all worksheets from one Workbook and create
another workbook with same ammount of sheets
somebody can help ?
 
J

Joel

If you copy sheets and don't use copy a new workbook is create with only one
page. Try this code

First = True
For Each sht In ThisWorkbook.Sheets
If First = True Then
sht.Copy
Set newbk = ActiveWorkbook
First = False
Else
sht.Copy after:=newbk.Sheets(newbk.Sheets.Count)
End If
Next sht
 
D

Dave Peterson

Why not just save the file as a new name?

Or use windows explorer to copy the file?
 
Top