save changes on exit


Posted by warren on October 19, 2000 2:24 AM

i need to have a button that automatically saves any changes that the user has made and exits from the workbook
any hints would be appreciated!

Posted by Ivan Moala on October 19, 2000 2:58 AM

Place this code in a module

Sub save_Quit()
Application.DisplayAlerts = False
ThisWorkbook.Save
ThisWorkbook.Close
Application.DisplayAlerts = True
End Sub


Attach macro to any object

OR

create a Button and from the display code
via right click, insert the code above.

Ivan



Posted by warren on October 19, 2000 12:54 PM

thanx for the module Ivan --wg