Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Determining if Macro Can Run

I'm distributing an Excel file with macros. I'd like to
open a dialog box telling users to change the security
option to allow macros to run, but only if their macro
security is set to "high." How do I determine the security
level when the fiel is opened?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Determining if Macro Can Run

If it is set to high, then no macros run unless they are certified. If
certified, then you don't need a warning, so I assume you are not certifying
your workbook. Therefore, you will never know if security is set to high
because your macro will not run.

--
Regards,
Tom Ogilvy

"mikem" wrote in message
...
I'm distributing an Excel file with macros. I'd like to
open a dialog box telling users to change the security
option to allow macros to run, but only if their macro
security is set to "high." How do I determine the security
level when the fiel is opened?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Determining if Macro Can Run

all that said, you could hide all but a single sheet in the workbook with
the admonition to set security to medium and allow the macros to run. Then
have code in the thisworkbook event that setups up your workbook normally
and restores it to the single sheet state in the workbook_beforeClose event.
Then, if macros are not run, you workbook has minimal utility and the user
is encouraged to enable macros (sees your message). If they are enabled,
the user may only see your admonition page flash before the workbook is
placed in a working state.

--
Regards,
Tom Ogilvy

"mikem" wrote in message
...
I'm distributing an Excel file with macros. I'd like to
open a dialog box telling users to change the security
option to allow macros to run, but only if their macro
security is set to "high." How do I determine the security
level when the fiel is opened?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Determining if Macro Can Run

Mike

If macros are disabled due to user choice or security settings at "High" you
can allow the workbook to open with a message sheet visible that explains that
macros must be enabled for workbook to function.

For more on this see this google search result.

http://snipurl.com/4ilp

Gord Dibben Excel MVP

On Sun, 15 Feb 2004 09:51:55 -0800, "mikem" wrote:

I'm distributing an Excel file with macros. I'd like to
open a dialog box telling users to change the security
option to allow macros to run, but only if their macro
security is set to "high." How do I determine the security
level when the fiel is opened?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Determining if Macro Can Run

Mike,

I use the message sheet approach in I explain that tells users that (1) macros
must be enabled for the workbook to function; (2) the Security Level must be
set to Medium using Tools- Options- Security- Macro Security- Security
Level tab; and (3) 'Trust access to Visual Basic Project' must be checked using
Tools- Options- Security- Macro Security- Trusted Sources tab

-- Dennis Eisen


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
Determining the current row and col k483 Excel Discussion (Misc queries) 2 November 25th 05 05:50 PM
need help with determining a formula Cal Excel Worksheet Functions 2 November 11th 05 01:49 PM
Determining a call in a macro Mark Excel Discussion (Misc queries) 2 April 26th 05 09:06 PM
Determining the last row in a spreadsheet Tom Ogilvy Excel Programming 6 September 17th 03 04:59 PM
determining last column jacqui Excel Programming 4 July 24th 03 09:38 PM


All times are GMT +1. The time now is 06:33 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"