VB code for disabling

  • Thread starter Thread starter DJ
  • Start date Start date
D

DJ

Is there a way to disable a user's access to the VB code
in an excel workbook?

Is there a way to make the workbook close if the user
options not to enable macros?
 
In VBA, bring down the tools menu, select Project Properties, click the protection tab, then use the password facility. only special software will crack this password
 
<<disable a user's access to the VB code in an excel workbook? >>
Use Tools/VBA Project Properties to set a password.

<<Is there a way to make the workbook close if the user options not to
enable macros?>>
No - because this would require a macro to run.

The usual method is to hide (and password protect) all the sheets but
one which says something like "Macros must be enabled to use this
workbook." You can then put code in the Workbook_Open() event which
hides this sheet and makes the others visible. If macros are not
enabled, the user cannot get access.

Regards
BrianB
=========================================================
 
Back
Top