how to save current sheet
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
On Tue, 15 Dec 2009 12:57:01 -0800, Raz
wrote:
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.
"Gary''s Student" wrote:
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
--
Gary''s Student - gsnu200909
"Raz" wrote:
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.
|