Convert excel worksheets into new workbooks (new files)

G

G

I have an excel file that contains 80 worksheets. I want to automatically
convert each worksheet into own new excel file. How can I do that without
copying and pasting?
 
D

Dave Peterson

Maybe some sort of macro:

Option Explicit
Sub testme()

Dim wks As Worksheet

For Each wks In ActiveWorkbook.Worksheets
wks.Copy 'to a new workbook
With ActiveSheet
.Parent.SaveAs Filename:="C:\temp\" & .Name, _
FileFormat:=xlWorkbookNormal
.Parent.Close savechanges:=False
End With
Next wks

End Sub

Make sure C:\temp\ already exists (or change the code to point at an existing
folder)
 

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

Top