Save & Exit

A

Anthony

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
 
G

Gord Dibben

Anthony

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


Gord Dibben Excel MVP
 
Top