Thread: Save As
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default Save As

ActiveWorkbook.SaveAs Range("B3")

or

ActiveWorkbook.SaveAs Range("B3") & ".xls"

depending on whether the extension is included in the cell.

Be warned that unless you specify the path, your workbook may end up being
saved in a completely different directory from what you may be expecting.

--

Vasant


"Gene" wrote in message
...
Hi gang
I am trying to save one sheet of a workbook to a new file. Currently I am

using....
Sub SaveTestSheetSeparately()
Worksheets("test").Copy
ActiveWorkbook.SaveAs "test1.xls"
End Sub
I would like the file name to be the contents of cell B3. How do I need to

modify the code.
Thanks
Gene