Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ron M.
 
Posts: n/a
Default Need a "save & close" button directly on spreadsheet

I need a button which, when clicked, will do a "Save" and close the
file, exactly as if you'd clicked "Save" in the File menu. The thing
is, this needs to be a button directly on the spreadsheet, next to some
other buttons I have on there that run macros, NOT a button on a
toolbar. Is there a macro that will do this that I can connect to a
button?

Thanks,
Ron M.

  #2   Report Post  
Anne Troy
 
Posts: n/a
Default Need a "save & close" button directly on spreadsheet

Here you go:
Sub SaveAndClose()
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
************
Anne Troy
www.OfficeArticles.com

"Ron M." wrote in message
oups.com...
I need a button which, when clicked, will do a "Save" and close the
file, exactly as if you'd clicked "Save" in the File menu. The thing
is, this needs to be a button directly on the spreadsheet, next to some
other buttons I have on there that run macros, NOT a button on a
toolbar. Is there a macro that will do this that I can connect to a
button?

Thanks,
Ron M.



Reply
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
Some exported records do not show on spreadsheet vulcan88 Excel Worksheet Functions 0 March 30th 05 01:11 AM
Applying Existing Password to New Spreadsheet Vic Excel Discussion (Misc queries) 1 January 27th 05 01:37 AM
Command Button VBA code Dave Peterson Excel Discussion (Misc queries) 2 January 26th 05 12:28 AM
Macro to simply bring up the Find dialogue box?? marika1981 Excel Discussion (Misc queries) 14 January 14th 05 11:47 PM
command button moves Stuart Excel Discussion (Misc queries) 2 December 15th 04 06:56 PM


All times are GMT +1. The time now is 12:55 PM.

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

About Us

"It's about Microsoft Excel"