OssieMac;167131 Wrote:
When the Workbook_BeforeClose event runs it does run the protect code
but that is a change to the workbook and that causes Excel to open a
diaglog box and ask the user if they want to save. If the user answers
No then the workbook closes as it was last saved before the Workbook
close event ran and hence no protection.
If you look at the logic in the macros I suggested, every time the book
saves it is protected FIRST. So, if they try to CLOSE and say NO to
saving, then the workbook available is the last saved one which IS a
protected version.
I've used this approach with hidden sheets effectively, so the
protection scheme seems just as sound.
--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile:
http://www.thecodecage.com/forumz/member.php?userid=73
View this thread:
http://www.thecodecage.com/forumz/sh...ad.php?t=46287