how to save current sheet

  • Thread starter Thread starter Raz
  • Start date Start date
R

Raz

hi, is there any way to save only the current (working) sheet as .xls or
..xlsx skipping all the other sheets???

I know its possible to save as .csv and may be other formats which saves
only current sheet. is it possible to save as .xls or xlsx ????

thanks.
 
You could use a macro to delete all but the current sheet and then saveas a
new name:

Sub Macro1()
Dim s As Worksheet
For Each s In Worksheets
If s Is ActiveSheet Then
Else
s.Delete
End If
Next

ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\jravensw\My Documents\newname.xls"
End Sub
 
thanks, but that wont work, becouse sometimes i need to save all sheets, and
sometime only one sheet.
Any other way to do it ??

currently i am saving the whole book and then deleting rest of the sheets.
which takes time.
 
Sub Make_New_Books()
Dim w As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In ActiveWindow.SelectedSheets
w.Copy
With ActiveWorkbook
.SaveAs Filename:="C:\Gordstuff\" & w.Name & ".xls"
.Close
End With
Next w
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP
 
Back
Top