View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Tom Ogilvy
 
Posts: n/a
Default PASSWORD PROTECT BEFORECLOSE

This sounds like a real bad idea.

If you don't want them to save the workbook, then make it read only. If you
want to prevent saving to a different name, then in the beforeclose event,
set Cancel = true and close the workbook.

Any macro based protection is easily defeated by disabling macros, however.

--
Regards,
Tom Ogilvy


"KandK" wrote in message
...
Tristan was kind enough to enlighten me into using Visual Basic Editor to
have a message box asking Are you sure you want to close? when someone

tries
to close a workbook. However it would be great if I could password protect
the closing of a workbook. This is the first time I have used Visual Basic
Editor so with my very limited experience and Microsoft Excel Help I could
not work out a way. So if anyone has any suggestions or could even tell me

it
is not possible it would be greatly appreciated. Many thanks.