I have a Application.Quit button knocking about and i have got it to ActiveWorkbook.Save but i dont want excel to ask if i want to save again after that before closing. Can you dissable it?
Printable View
I have a Application.Quit button knocking about and i have got it to ActiveWorkbook.Save but i dont want excel to ask if i want to save again after that before closing. Can you dissable it?
Sure can :)
VB Code:
DisplayAlerts = False
I do the same thing with the following:
VB Code:
Sub Workbook_BeforeClose(Cancel As Boolean) If Me.Saved = False Then Me.Save End Sub
Depends if you want to actually force a save on exit, but it looks like you have this coded anyway so just offering it as a possible solution.
You can also just make pretend to Excel that it did save with
if me.saved = false then me.saved = true
in your beforeclose event.