Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default forcing 'macro enable' on open

Is there a way to essential "force" a user to enable macros by eithe
giving him the choice to enable, or if he doesnt then the workbook i
forced to close?

In other words, a user cannot edit the workbook without allowing macro
enabled.

I know that if the wb contains XL4.0 macros and the security level i
set to high, then this exact scenario exists... but i cannot ensure th
user's Excel security level is set to High

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default forcing 'macro enable' on open

No, you can't truly force a user to do anything. One possible way that will
work with less sophisticated users is to hide all but the sheets except one,
and on that sheet have a message "Hey, only open this workbook with the
macros enabled."

Then use the workbook open event to hide that 'message' sheet and unhide the
others. Password protect everything, including sheets, workbook, and VBA
project, so if they open the workbook with macros enabled, they get to see
the sheets, otherwise, they only get the message sheet.

HTH,
Bernie
MS Excel MVP

"i-Zapp " wrote in message
...
Is there a way to essential "force" a user to enable macros by either
giving him the choice to enable, or if he doesnt then the workbook is
forced to close?

In other words, a user cannot edit the workbook without allowing macros
enabled.

I know that if the wb contains XL4.0 macros and the security level is
set to high, then this exact scenario exists... but i cannot ensure the
user's Excel security level is set to High.


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default forcing 'macro enable' on open

You can't force a user to enable macros, that would defeat the security
settings. And if macros are disabled, then you can't force the wb to close.
What you can do is create a sheet with a statement on it something like "You
must enable macros to use this Workbook. Close the Workbook and re-open with
macros enabled." In the Private Sub WorkBook_Open() of ThisWorkbook, Hide
this sheet and Unhide all the other sheets. In the Private Sub
WorkBook_Close() of ThisWorkbook, Hide all the other sheets and unhide this
one. This will make only the warning sheet visible when the book is closed.
If it is opened with macros disabled, then the WorkBokk_Open cannot run and
all they can do is read the warning sheet.

Mike F

"i-Zapp " wrote in message
...
Is there a way to essential "force" a user to enable macros by either
giving him the choice to enable, or if he doesnt then the workbook is
forced to close?

In other words, a user cannot edit the workbook without allowing macros
enabled.

I know that if the wb contains XL4.0 macros and the security level is
set to high, then this exact scenario exists... but i cannot ensure the
user's Excel security level is set to High.


---
Message posted from http://www.ExcelForum.com/



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
Forcing a workbook to open on a certain page learningguru1978 Excel Discussion (Misc queries) 6 November 21st 08 07:29 PM
How can force enable macros to be able to open my workbook? kcdonaldson Excel Discussion (Misc queries) 3 December 5th 05 06:16 PM
Forcing a macro to pause for filename matpoh Excel Discussion (Misc queries) 3 September 13th 05 06:28 PM
Forcing a macro to (semi-) automatically run Richard Owlett Excel Programming 2 February 21st 04 06:10 PM
Forcing users to enable macros universal[_17_] Excel Programming 8 December 20th 03 03:14 PM


All times are GMT +1. The time now is 05:56 AM.

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

About Us

"It's about Microsoft Excel"