derek.hughes
Board Regular
- Joined
- Mar 16, 2012
- Messages
- 53
In my script below it saves each tab in Excel as a separate worksheet and titles the file the same as the tab name.
Is there a way to make it save as an .xlsx ***e unstead of a .xls file?
Thanks in advance!
Dim wks As Worksheet
Dim newWks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
wks.Copy 'to a new workbook
Set newWks = ActiveSheet
With newWks
Application.DisplayAlerts = False
.Parent.SaveAs Filename:="C:\Users\eo2249di\Desktop\" & .Name, _
FileFormat:=xlWorkbookNormal
Application.DisplayAlerts = True
.Parent.Close savechanges:=False
End With
Next wks
Is there a way to make it save as an .xlsx ***e unstead of a .xls file?
Thanks in advance!
Dim wks As Worksheet
Dim newWks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
wks.Copy 'to a new workbook
Set newWks = ActiveSheet
With newWks
Application.DisplayAlerts = False
.Parent.SaveAs Filename:="C:\Users\eo2249di\Desktop\" & .Name, _
FileFormat:=xlWorkbookNormal
Application.DisplayAlerts = True
.Parent.Close savechanges:=False
End With
Next wks