??Programmatically set security level to medium

D

DG

Using Excel 2000, can I programmatically set the macros>security setting to
medium on open? Hunted high and low (pardon the pun) but can't seem to find
anything that specifically says "no", although "yes" hasn't really come up
either!
 
H

Harlan Grove

DG said:
Using Excel 2000, can I programmatically set the macros>security setting to
medium on open? Hunted high and low (pardon the pun) but can't seem to find
anything that specifically says "no", although "yes" hasn't really come up
either!

For anything that can be done interactively, try doing it while the macro
recorder is on. You'll see it doesn't record anything, so the likelihood is
high that you can't do this.
 
F

Frank Kabel

Hi
in addition to Harlan's answer: If you would be able to do this
programmatically which would undermine the security purpose of this
feature (weak as it is). So no where should be no way to do this (and
there is none)
 
H

Harlan Grove

Frank Kabel said:
in addition to Harlan's answer: If you would be able to do this
programmatically which would undermine the security purpose of this
feature (weak as it is). So no where should be no way to do this (and
there is none)

Never say never. Actually it can be done with SendKeys, and there's no way
to prevent that.
 
R

Ron de Bruin

Hi Frank/Harlan

XL 2002/2003

Look at Application.AutomationSecurity in the VBA help
 
H

Harlan Grove

Frank Kabel said:
just curious - wouldn't the sendkeys macro only be activated AFTER you
have allowed macros?
Of course using a different Office application or workbook this could
be feasible but opening the first workbook in Excel Sendkeys should
also require the enabling of macros prior to their execution?

If all macros are disabled, then there's only danger from other apps, but I
know of no way to prevent a macro running in Word from affecting Excel via
OLE.
 

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