macro to copy workbook with several worheets

  • Thread starter Thread starter CC
  • Start date Start date
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 ?
 
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
 
Why not just save the file as a new name?

Or use windows explorer to copy the file?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top