Set Security levels via macro

J

J. Shrimp, Jr.

I have a spreadsheet with a Save macro.
This macro should set the Security levels
for macros back to high when the spreadsheet
closes.
When I try to record a macro to that sets the
security level, no code is written to the macro.

What code will set the security level for macros?
 
B

Bernie Deitrick

J.,

You can't modify security levels with a macro - it is not exposed to
VBA.

HTH,
Bernie
 
T

Tom Ogilvy

I don't believe you have programmatic control over the security levels. It
would be surprising if you did.
 
I

immanuel

You might consider using the Windows API or WScript's Shell object to modify
entries in the registry. The key to modify is:

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Security\Level

Set 11.0 in the path above to the version of Office the end user is using.

/i.
 

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