View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Billigmeier David Billigmeier is offline
external usenet poster
 
Posts: 176
Default Excel 2003 - A macro to exit excel

Chage the reference of [a1] to the cell on your worksheet that has the name
you want to save as:

Sub SaveAndClose()
ActiveWorkbook.SaveAs Filename:= _
"C:\myDirectory\" & [a1] & ".xls"
ActiveWorkbook.Close
End Sub



--
Regards,
Dave


"Alan_Malawi" wrote:

Hi I need to create a macro that will first do a "save as" picking up a file
name from a cell on the worksheet and then will exit excel