Hi guys,
A while ago some kind person on this forum gave me a neat piece of code for save worksheets to seperate files and maintaining the main Filename and apending the file to add the tab name of the worksheet.
I wondered if I could expand on that. What I need to know is how the code below could be modified so that I could save only the currently active worksheet to a seperate file.
For example; if my workbook was called Book1.xls and I had the standard sheet names. If say Sheet2 was the active sheet then the code would save that sheet to a seperate Workbook called: Book1 - Sheet2.xls and that this workbook only contained Sheet2 in it.
Is this possible?
Thanks in advance. 
Sub SaveAll()
Dim myWb As Workbook
Set myWb = ActiveWorkbook
myPathWhereToSave = "D:\MS OFFICE\Excel Docs\Temp\"
Application.ScreenUpdating = False
For Each sh In myWb.Sheets
sh.Copy
ActiveWorkbook.SaveAs Filename:=myPathWhereToSave & Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 4) & " - " & sh.Name, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWorkbook.Close
Next
Application.ScreenUpdating = True
End Sub
Bookmarks