Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Some exported records do not show on spreadsheet | Excel Worksheet Functions | |||
Applying Existing Password to New Spreadsheet | Excel Discussion (Misc queries) | |||
Command Button VBA code | Excel Discussion (Misc queries) | |||
Macro to simply bring up the Find dialogue box?? | Excel Discussion (Misc queries) | |||
command button moves | Excel Discussion (Misc queries) |