Change Application Security Settings

W

WhytheQ

If someone has their security setting put to High is it possible to
either change their setting to Medium programmatically, or get a
message box to pop up and tell them that they need to change their
setting to Medium ?

(I realise that none of the above is propbably possible as the security
setting will be well protected.....but thought I'd ask anyhow, as a lot
of people know nothing about Excel and blame my code when a program
doesn't work - when it is simply that they have their settings too
high)

Any help appreciated
Jason
 
J

Jim Thomlinson

You are correct in that you can not read or write to the security settings.
But you can use teh fact that if their security is set to high then no
macro's will run. Create your spreadsheet using the on open and on close
events. In the on close event hide all but one sheet that tells them that
their security is set incorrectly. In the on open add code to unhide all of
the sheets and hide the security instruction page. This way if their security
is set to high then the only thing they will see is your instruction page
telling them to change the security. Otherwise the spreadsheet will function
as normal...
 
T

Tom Ogilvy

if in xl2002 and later, a high security setting disables macros for
uncertified workbooks. Once the macros are disabled, there is no way for you
to tell the user anything or attempt to change anything. The usual
recommendation is to put macros in your workbook that will hide all sheets
except a message sheet that has a big message saying if you see this message,
you need to set security to medium and close and reopen the workbook. Then
if the workbook opens with macros enabled, your code would restore it to a
working state and return it to the "protected" state upon closing.
 
W

WhytheQ

thanks folks!
good advice.
Jase


Tom said:
if in xl2002 and later, a high security setting disables macros for
uncertified workbooks. Once the macros are disabled, there is no way for you
to tell the user anything or attempt to change anything. The usual
recommendation is to put macros in your workbook that will hide all sheets
except a message sheet that has a big message saying if you see this message,
you need to set security to medium and close and reopen the workbook. Then
if the workbook opens with macros enabled, your code would restore it to a
working state and return it to the "protected" state upon closing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top