ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ??Programmatically set security level to medium (https://www.excelbanter.com/excel-programming/292887-programmatically-set-security-level-medium.html)

DG

??Programmatically set security level to medium
 
Using Excel 2000, can I programmatically set the macrossecurity 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!



Harlan Grove

??Programmatically set security level to medium
 
"DG" wrote...
Using Excel 2000, can I programmatically set the macrossecurity 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.



Frank Kabel

??Programmatically set security level to medium
 
In addition to Harlan's answer

--
Regards
Frank Kabel
Frankfurt, Germany

DG wrote:
Using Excel 2000, can I programmatically set the macrossecurity
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!


Frank Kabel

??Programmatically set security level to medium
 
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)

--
Regards
Frank Kabel
Frankfurt, Germany

DG wrote:
Using Excel 2000, can I programmatically set the macrossecurity
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!



Harlan Grove

??Programmatically set security level to medium
 
"Frank Kabel" wrote...
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.



Ron de Bruin

??Programmatically set security level to medium
 
Hi Frank/Harlan

XL 2002/2003

Look at Application.AutomationSecurity in the VBA help

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Frank Kabel" wrote in message ...
Hi Harlan
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?

--
Regards
Frank Kabel
Frankfurt, Germany

Harlan Grove wrote:
"Frank Kabel" wrote...
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.





Frank Kabel

??Programmatically set security level to medium
 
Hi Ron
thanks for the hint :-)

--
Regards
Frank Kabel
Frankfurt, Germany

Ron de Bruin wrote:
Hi Frank/Harlan

XL 2002/2003

Look at Application.AutomationSecurity in the VBA help


"Frank Kabel" wrote in message
...
Hi Harlan
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?

--
Regards
Frank Kabel
Frankfurt, Germany

Harlan Grove wrote:
"Frank Kabel" wrote...
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.



Harlan Grove

??Programmatically set security level to medium
 
"Frank Kabel" wrote...
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.



Jon Peltier

??Programmatically set security level to medium
 
Or VB, which won't invoke a macro warning.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

Harlan Grove wrote:

"Frank Kabel" wrote...

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.





All times are GMT +1. The time now is 11:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com