View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Paul Moles Paul Moles is offline
external usenet poster
 
Posts: 34
Default Turn Off Macros With Workbook Open

I have a workbook with complementary Auto_Open and Workbook_BeforeClose code.

Part of Auto_Open ensures macros are enabled. With Workbook_BeforeClose
resetting the workbook for when it is next opened.

Question having opened a workbook with macros enabled can a user then turn
them off sometime during the use of the book, thereby disabling my
Workbook_BeforeClose code. (Access to Macro code is password protected)

Could not find correct placement/syntax for Application.EnableCancelKey -
xlDisabled. but having tried Ctrl+Break, it has no effect as these macros are
not actually running while the book is in use.

Many Thanks
Paul Moles