PC Review


Reply
Thread Tools Rate Thread

disable workbook

 
 
Roxy
Guest
Posts: n/a
 
      14th Oct 2008
I would like to not allow a user to open a workbook if she/he does not enable
macros when prompted. Is there a cool way to do this? I have some code in
the Workbook_Open that must run when the workbook is open. Thanks.
 
Reply With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      14th Oct 2008
If macros are not enabled, no code runs.

"Roxy" wrote:

> I would like to not allow a user to open a workbook if she/he does not enable
> macros when prompted. Is there a cool way to do this? I have some code in
> the Workbook_Open that must run when the workbook is open. Thanks.

 
Reply With Quote
 
john
Guest
Posts: n/a
 
      14th Oct 2008
the common way most deal with this problem is to hide all but one sheet when
saving & closing your workbook. This sheet would be displayed when macro's
are not enabled next time workbook is opened, showing a message informing
user that macro's must be enabled.
If however, macros are enabled then other worksheets are unhidden & message
sheet hidden.
Sounds tad complicated but can be made to work for most uses.
Have a look at this site for some idea how to approach the problem. You can
google other sites for further samples
http://www.dotxls.com/excel-security...e-excel-macros

Hope helpful


--
jb


"Roxy" wrote:

> I would like to not allow a user to open a workbook if she/he does not enable
> macros when prompted. Is there a cool way to do this? I have some code in
> the Workbook_Open that must run when the workbook is open. Thanks.

 
Reply With Quote
 
Alan Moseley
Guest
Posts: n/a
 
      17th Oct 2008
Nice answer John! Thinking 'out of the box'.
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk


"john" wrote:

> the common way most deal with this problem is to hide all but one sheet when
> saving & closing your workbook. This sheet would be displayed when macro's
> are not enabled next time workbook is opened, showing a message informing
> user that macro's must be enabled.
> If however, macros are enabled then other worksheets are unhidden & message
> sheet hidden.
> Sounds tad complicated but can be made to work for most uses.
> Have a look at this site for some idea how to approach the problem. You can
> google other sites for further samples
> http://www.dotxls.com/excel-security...e-excel-macros
>
> Hope helpful
>
>
> --
> jb
>
>
> "Roxy" wrote:
>
> > I would like to not allow a user to open a workbook if she/he does not enable
> > macros when prompted. Is there a cool way to do this? I have some code in
> > the Workbook_Open that must run when the workbook is open. Thanks.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hoe to disable a workbook? Fan924 Microsoft Excel Programming 1 3rd Mar 2009 04:09 AM
How to disable a workbook? Fan924 Microsoft Excel Programming 1 3rd Mar 2009 01:23 AM
Disable WorkBook AutoOpen THE_RAMONES Microsoft Excel Programming 1 1st Dec 2008 08:06 PM
disable closing of workbook =?Utf-8?B?VmFydW4gTmFpcg==?= Microsoft Excel Programming 1 27th Jul 2006 01:50 PM
Disable cut paste in a workbook Narendra Nath Microsoft Excel Programming 0 10th Mar 2006 01:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:21 PM.