Programmatically preventing macros issues
If I am understand your problem correctly...
Have you tried assigning a personal digital certtificate to your
project file/VBA application and setting the macro level to High in
Excel?
Microsoft office allows you to make digital certificates for just that
purpose - so you can be prompted before you accept running a macro
from an untrusted source only once (trust those you want - discard
those you don't - in this case you will be trusting your file and
disgarding the data source macros without the hassle of being
prompted).
To make a certificate: Start Microsoft Office Office Tools
Digital Certificates for VBA Projects
To apply it to your project file: In your VBA editor under tools
Digital Signature
....I think this is what you were asking and is one way to go about
trying to work around security.
Good Luck.
-Eric
On Sat, 7 Oct 2006 08:45:20 -0400, "Lew" wrote:
I'm writing an automation project which involves extracting data from ss
we receive from a bewildering number of sources, and we're afraid of the
possibility that my app may trigger a malicious macro. I understand that
I've got to set the AutomationSecurity value to 3, but I've still got a few
questions.
First: The tools-macros-security tab has 4 values; why can I only set
the AutomationSecurity value to 1, 2 or 3 (ie only 3 possible values)?
Second: If I set AutomationSecurity to 3 and, since we plan to disable
user interaction with excel while my app is running by making excel
invisible, is there any possibility that a macro (or anything else) could
trigger a dialog requiring user input & resulting in an apparent hang? If
yes, will DisplayAlerts = false take care of this? Please bear in mind that
the only thing we're doing (as of now anyway) is pulling values out of
cells, not anything that I see as requiring interaction.
Other suggestions or things to watch out for?
TIA!
|