ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Save & Exit (https://www.excelbanter.com/excel-worksheet-functions/12844-save-exit.html)

Anthony

Save & Exit
 
Hi,
Is it possible to have a macro which when clicked on will auto save a
workbook (and selecting the option for 'yes' when asked if you want to
replace the file already saved on the hard drive with the same name), then
exit the program ??

Any ideas??

Rgds

Anthony

Gord Dibben

Anthony

Sub SaveandQuit()
Application.DisplayAlerts = False
ActiveWorkbook.Save
Application.DisplayAlerts = True
Application.Quit
End Sub


Gord Dibben Excel MVP

On Sat, 12 Feb 2005 06:07:02 -0800, "Anthony"
wrote:

Hi,
Is it possible to have a macro which when clicked on will auto save a
workbook (and selecting the option for 'yes' when asked if you want to
replace the file already saved on the hard drive with the same name), then
exit the program ??

Any ideas??

Rgds

Anthony




All times are GMT +1. The time now is 02:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com