Can we code this?

P

Phil Hageman

Chip, Thanks - it works! Can I ask you this - I have an
Auto_Open Sub (below). Can this be modified to
automatically switch the user's security to Medium when
they open this workbook, then reset it to high on close?

Sub Auto_Open()
Application.ScreenUpdating = False

For Each ws In Worksheets
If ws.Visible = xlSheetVisible Then
ws.Select
Application.GoTo ws.Range("A1"), True
ActiveWindow.DisplayGridlines = False
End If
Next

Worksheets("Scorecard").Select
Application.AutoPercentEntry = True
Application.ScreenUpdating = True

End Sub

Thanks, Phil
 
B

Bob Phillips

Phil,

Chip has answered the question, but just think about it, what sort of
security would it be if you could do that?
 
K

Ken Wright

Imagine the thousands of virus writers out there just sitting quietly, watching this thread and
praying that Chip can give you some magic to really do that. <vbg>
 
P

Phil Hageman

You are right - I'm getting out of line here. I will
educate the user. Thanks for setting me straight.
 
J

jaf

Hi Phil,
Not sure what your trying to accomplish, but you might want to look into
user profiles to control who can run macros.
 
P

Phil Hageman

This is the answer! Thanks Myrna.
-----Original Message-----
Perhaps you should investigate Digital Signatures. If you
sign your workbooks, the user can set
his security to medium, then open your workbook. They
will told that the code has been signed by
you and given (1) the option to run macros or not, and
(2) to "always trust macros from this
source".

Once they answer the latter affirmatively, they can set
their security back to High and still
open your workbooks.
 

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