Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable Macro security

Status
Not open for further replies.

Lavey

IS-IT--Management
Jun 1, 2001
115
DE
Hi,

I have a workbook with senstive information on some worksheets.

I have written a small select case on the auto_open (based on an API call to get system user name) so depending on the user depends on which sheets are displayed.

Trouble is my company have locked down the security options in the macro security area - so it is always on medium, and the users get the choice as to enable/disable these macros, which in turn if they select disable does not run my auto exec code....

Is there a way I can force this code to run ? Or alternatively is there a way I can hide the worksheets so they can only be unhidden by code ? (So users will have to enable macros to run some code on a button or something).

Any other ideas on this ?

Thx
<disgruntled severly locked down by security employee>

Honest guv, i didn't do it !
 
Set the visible property to xlVeryHidden. The worksheet will not be displayed in the Format>Sheets>Unhide menu. You should probably hide all sensitive sheets on workbook_close. Then, when it is opened, they can only be displayed if your macro runs.
Code:
Sheets(&quot;Sheet2&quot;).Visible = xlSheetVeryHidden
Hope this helps...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top