Test for Disable / Enable Macros
There is no effective way to circumvent the Macro Security. The problem you
are going to run into is that if the macros are disabled then NO code runs
and you can not use code to check anything. The most effective work around is
to ensure that all of the sheets are very hidden (done with befroe close
code) with the exception of a security sheet that tells the user that macros
must be enabled to use the book. If macros are enabled then use code to
unhide the appropriate sheets and hide the security page.
--
HTH...
Jim Thomlinson
"Neal Zimm" wrote:
I'm building an App where code in the Wbk Open event must execute.
I can't find where/how to test if the user has clicked the disable macro
button when Excel presents that choice. (Note: I have a "gateway" Sub in the
works that will execute before every user-selected macro to be the likely
home for this code.)
Further note: the open event calls a macro located in an add-in.
1) example please or point me in the right direction?
2) I know the 'danger', but does Exel allow you to disable the dis/enable
dialog box in favor of forcing "Enable Macros". and if so, how?
Thanks much,
Neal Z
--
Neal Z
|