Suppose you drive a workbook based on events like
WORKBOOK_CHANGE.
Suppose futher that the workbook is locked to prevent users from viewing the VBA.
But suppose a user enters the VBA EDITOR and in the IMMEDIATE WINDOWS, executes:
Application.EnableEvents = False
All of your hard event driven code now fails...
How do you prevent users from performing the above? I guess that means, preventing users from kicking off their macros when your workbook is open OR preventing users from access to the VBE when your workbook is open.
But also that means disabling any add-ins that turn off event handling as well...
Perhaps you can capture the events state change and if 'not authorized', disable the attempt?
Thoughts?
WORKBOOK_CHANGE.
Suppose futher that the workbook is locked to prevent users from viewing the VBA.
But suppose a user enters the VBA EDITOR and in the IMMEDIATE WINDOWS, executes:
Application.EnableEvents = False
All of your hard event driven code now fails...
How do you prevent users from performing the above? I guess that means, preventing users from kicking off their macros when your workbook is open OR preventing users from access to the VBE when your workbook is open.
But also that means disabling any add-ins that turn off event handling as well...
Perhaps you can capture the events state change and if 'not authorized', disable the attempt?
Thoughts?