Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default disable workbook

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

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default disable workbook

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default disable workbook

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
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
Disable Pasting into a Workbook scottyboy Excel Worksheet Functions 2 May 9th 08 12:21 PM
Disable commands for one workbook Steve C Excel Programming 3 March 5th 07 05:11 PM
Disable cut paste in a workbook Narendra Nath Excel Programming 0 March 10th 06 01:42 PM
Disable the opening of another workbook DDLY Excel Programming 1 November 26th 03 07:52 PM
Disable a command from with in a workbook Tony Pizza Excel Programming 0 July 22nd 03 12:42 AM


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