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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top