![]() |
|
|
|
#1
|
|||
|
|||
|
This will save each sheet in the same location as the workbook :
Code:
Option Explicit
Sub save_each_sheet_as_separate_workbook()
Dim wb As Workbook, ws As Worksheet
Application.ScreenUpdating = False
''/////////// Include WB to be affectted in path below \\\\\\\\\
Set wb = ThisWorkbook
For Each ws In wb.Worksheets
If ws.Visible = True Then 'handles hidden sheets
ws.Copy
With ActiveWorkbook
.SaveAs Filename:=ThisWorkbook.Path & "\" & ws.Name, FileFormat:=56 '56 for xls, 51 for xlsx, 52 for xlsm
.Close False
End With
End If
Next ws
wb.Close False
Application.ScreenUpdating = True
End Sub
|
|
| Tags |
| vba excel |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Excel 2007 opens with worksheet displayed | rbul1 | Excel | 3 | 01-06-2019 06:25 AM |
| Excel Calendar in a worksheet | kenbird | Excel | 0 | 04-26-2015 02:48 AM |
| Worksheet Object in powerpoint 2007 | sridharreddyg20 | PowerPoint | 0 | 03-06-2014 12:05 PM |
| Paste special an Excel range into Outlook as an Excel Worksheet | charlesh3 | Excel Programming | 3 | 02-04-2013 04:33 PM |
Clone Outlook Settings
|
pmokover | Outlook | 1 | 08-30-2010 12:04 PM |