View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alan.Hutchins Alan.Hutchins is offline
external usenet poster
 
Posts: 2
Default Workbook opened with macros disabled

Having got past the issue of users using CTRL+Break to
stop a macro, a colleague has pointed out that users may
open a workbook with "Macros disabled".

This presents me with a conundrum...........

If the workbook is opened with macros disabled, I want to
prevent any data entry from taking place, but if the
macros are disabled, I can't use the worksheet change
event to inform the user..

The only solution I could think of is:

1. Identify all the cells which are unlocked for data
entry (all the rest are locked), and set them to "locked".

2. Write a procedure that "unlocks" these cells if the
parameter is set to an agreed value.

3. Set the parameter to the agreed value if the auto_open
macro has been successfully completed - thereby unlocking
the data entry cells.

This would stop any data entry if the workbook was opened
and the macros were disabled.

BUT, does anyone have any better solutions to this ?

I am presently on Windows NT with Excel 97.

Thanks

Alan