Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how do I prevent a file from opening if user has disabled macros?

I would like to show a dialogue box telling user that they do not have
macro's enabled and that the file they are attempting to open requires
macro's to work properly. I'd like this to show up even if they have set
Macro Security to high.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default how do I prevent a file from opening if user has disabled macros?

Can't do it. If security is high the macros won't run. Catch 22. Here is the
workaround. Add a sheet telling the user that macro security must be medium
or low. Use an on_open macro that does nothing but hide this sheet
(xlVeryHidden). If security is high then they see the sheet because the macro
won't run. Otherwise they see just what they are supposed to see. And to
answer your next question, no you can not change the security setting using a
macro.
--
HTH...

Jim Thomlinson


"mwh1107" wrote:

I would like to show a dialogue box telling user that they do not have
macro's enabled and that the file they are attempting to open requires
macro's to work properly. I'd like this to show up even if they have set
Macro Security to high.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how do I prevent a file from opening if user has disabled macr

Thanks. As a newby, it took me a while to figure out how to make a On_Open
sub, but I figured it out.

I also had to change the state of the "warning" worksheet to visible
BeforeClose.

Thanks again.

"Jim Thomlinson" wrote:

Can't do it. If security is high the macros won't run. Catch 22. Here is the
workaround. Add a sheet telling the user that macro security must be medium
or low. Use an on_open macro that does nothing but hide this sheet
(xlVeryHidden). If security is high then they see the sheet because the macro
won't run. Otherwise they see just what they are supposed to see. And to
answer your next question, no you can not change the security setting using a
macro.
--
HTH...

Jim Thomlinson


"mwh1107" wrote:

I would like to show a dialogue box telling user that they do not have
macro's enabled and that the file they are attempting to open requires
macro's to work properly. I'd like this to show up even if they have set
Macro Security to high.

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
Macros Disabled when opening file snax500 Excel Discussion (Misc queries) 1 October 19th 06 09:37 PM
How to prevent user to copy excel file to their own pc shirley_kee Excel Discussion (Misc queries) 4 April 7th 06 04:24 PM
In VBA, Open a file with macros disabled Otto Moehrbach[_6_] Excel Programming 1 October 24th 04 11:44 PM
Prevent user from disabling macros Michael Monteiro Excel Programming 0 August 21st 03 04:28 AM
prevent user from saving excel file to a folder susie Excel Programming 2 July 24th 03 09:12 PM


All times are GMT +1. The time now is 03:40 AM.

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"