Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 345
Default Test for Disable / Enable Macros

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 182
Default Test for Disable / Enable Macros

Hi,

I think Jim was right but I've tried by using registry file or changing
Excel's security via *.reg that opened before execute Excel file.

You can change the security you like... but ensure that registry contents
correct Address of setting you want to change (Excel Security), that depend
on you Excel version... ...
--

Regards,

Halim


"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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Test for Disable / Enable Macros

If I found your code attempting to change my security setting, I would
instantly delete all your products.
If you cannot operate within the user's environment, inform the user of the
limitation/situation and exit.
Unless of course you wish to get a name as a virus writer.

NickHK

"Halim" wrote in message
...
Hi,

I think Jim was right but I've tried by using registry file or changing
Excel's security via *.reg that opened before execute Excel file.

You can change the security you like... but ensure that registry contents
correct Address of setting you want to change (Excel Security), that

depend
on you Excel version... ...
--

Regards,

Halim


"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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 345
Default Test for Disable / Enable Macros

Thanks, i have very hidden sheets already and will try to incorporate what i
need into them.
--
Neal Z


"Jim Thomlinson" wrote:

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 345
Default Test for Disable / Enable Macros

Thanks, but i really don't fool with the registry yet. I'll find a workaround.
--
Neal Z


"Halim" wrote:

Hi,

I think Jim was right but I've tried by using registry file or changing
Excel's security via *.reg that opened before execute Excel file.

You can change the security you like... but ensure that registry contents
correct Address of setting you want to change (Excel Security), that depend
on you Excel version... ...
--

Regards,

Halim


"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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 182
Default Test for Disable / Enable Macros

Sorry Nick...

I'm not attempting to harm other people application, I only try to share...
:D
--

Regards,

Halim


"NickHK" wrote:

If I found your code attempting to change my security setting, I would
instantly delete all your products.
If you cannot operate within the user's environment, inform the user of the
limitation/situation and exit.
Unless of course you wish to get a name as a virus writer.

NickHK

"Halim" wrote in message
...
Hi,

I think Jim was right but I've tried by using registry file or changing
Excel's security via *.reg that opened before execute Excel file.

You can change the security you like... but ensure that registry contents
correct Address of setting you want to change (Excel Security), that

depend
on you Excel version... ...
--

Regards,

Halim


"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




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 345
Default Test for Disable / Enable Macros

Thanks, kinda new @ this and didn't that of that aspect. Very sensible.
Thanks again.
--
Neal Z


"NickHK" wrote:

If I found your code attempting to change my security setting, I would
instantly delete all your products.
If you cannot operate within the user's environment, inform the user of the
limitation/situation and exit.
Unless of course you wish to get a name as a virus writer.

NickHK

"Halim" wrote in message
...
Hi,

I think Jim was right but I've tried by using registry file or changing
Excel's security via *.reg that opened before execute Excel file.

You can change the security you like... but ensure that registry contents
correct Address of setting you want to change (Excel Security), that

depend
on you Excel version... ...
--

Regards,

Halim


"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




  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Test for Disable / Enable Macros

Nothing personal, just I would not advise that as a good approach..

NickHK

"Halim" wrote in message
...
Sorry Nick...

I'm not attempting to harm other people application, I only try to

share...
:D
--

Regards,

Halim


"NickHK" wrote:

If I found your code attempting to change my security setting, I would
instantly delete all your products.
If you cannot operate within the user's environment, inform the user of

the
limitation/situation and exit.
Unless of course you wish to get a name as a virus writer.

NickHK

"Halim" wrote in message
...
Hi,

I think Jim was right but I've tried by using registry file or

changing
Excel's security via *.reg that opened before execute Excel file.

You can change the security you like... but ensure that registry

contents
correct Address of setting you want to change (Excel Security), that

depend
on you Excel version... ...
--

Regards,

Halim


"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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable/Disable Macros Pop-Up juamig Excel Discussion (Misc queries) 1 April 9th 10 06:29 PM
Enable/Disable macros Adam Excel Discussion (Misc queries) 2 March 11th 05 10:29 AM
Enable/Disable Macros Ben Schaum Excel Discussion (Misc queries) 1 January 21st 05 03:42 PM
Suppress the Disable Macros / Enable Macros Dialog Shoji Karai Excel Programming 5 September 24th 03 03:10 AM
Enable/Disable Macros Joseph[_6_] Excel Programming 3 August 23rd 03 02:54 PM


All times are GMT +1. The time now is 12:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"