Macro to save just one sheet.


Posted by Stuart on October 17, 2001 1:41 PM

how would you write a macro to save one sheet from a workbook of many sheets to a folder in c:\send\

Any help in this would get my arse out of a bind.



Posted by Qroozn on October 17, 2001 3:27 PM

you need to write a macro that will
1. select and copy the entire sheet
2. open a new workbook and paste it in
3 Save as c:\send
try the following.

Sub saveasmyfilename()

Worksheets("sheet1").Select
Selection.Copy
Set NewBook = Workbooks.Add

Selection.Paste
ChDir "C:\send"
ActiveWorkbook.SaveAs FileName:="myfilename.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub