Hello,
I've this beforesave event that basically blocks the file from use in case someone opens it with macro's disabled.
after saving it returns the file to the state it was in when the user hit the save button.
This works fine, but if you close the file through the X in the top right corner of the window, Excel launches the 'Do you wish to save your changes' dialog. If you click 'yes', the event fires, but at the end of that Excel again asks if you want to save your changes. This keeps happening until you say NO. I don't understand this behavior as the last line of code in the event is 'ThisWorkbook.Saved = TRUE'.
I've tried numerous ways of getting it to close after saying yes, but so far nothing has done what I intend.
Can anyone help me out with some suggestions?
Cheers,
Roel
I've this beforesave event that basically blocks the file from use in case someone opens it with macro's disabled.
after saving it returns the file to the state it was in when the user hit the save button.
This works fine, but if you close the file through the X in the top right corner of the window, Excel launches the 'Do you wish to save your changes' dialog. If you click 'yes', the event fires, but at the end of that Excel again asks if you want to save your changes. This keeps happening until you say NO. I don't understand this behavior as the last line of code in the event is 'ThisWorkbook.Saved = TRUE'.
I've tried numerous ways of getting it to close after saying yes, but so far nothing has done what I intend.
Can anyone help me out with some suggestions?
Cheers,
Roel