LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro wants to exit excel curlydave Excel Discussion (Misc queries) 3 July 2nd 06 04:19 PM
No prompt on exit in Excel 2003 nsm Setting up and Configuration of Excel 0 May 3rd 06 10:56 PM
Excel 2003 Will Not Save On Exit tmyhlfgr Excel Discussion (Misc queries) 2 November 3rd 05 02:45 PM
Excel 2003 doesn't prompt to save on exit? Mole Chaser Setting up and Configuration of Excel 4 October 29th 05 03:21 AM
Excel 2003 doesn't prompt to save on exit? Alan Cannon Setting up and Configuration of Excel 1 October 23rd 05 11:02 PM


All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"