Change Macro security level of Ms Access 2003 to LOW by using VBA

T

Tran Hong Quang

Hi,
If Ms Access database has macro and run it with Ms Access 2003, there is a
popup message warning about security risk. To disable this warning message, I
have to run Ms Access alone, go to menu Tools> Security>> Macro and set the
level to LOW.

Is it possible to change Macro security level to LOW by using VBA?

Thanks
Quang
 
D

Dennis

Not sure where you would put this code so that it executes before the pop up
message appears but according to the help this will switch it to low

Application.AutomationSecurity =msoAutomationSecurityLow
 
D

Douglas J Steele

Kinda defeats the purpose of security if you can reset the value before the
pop-up message appeared, doesn't it?

I would assume it's not possible.
 
A

Alex Dybenko

Perhaps if you first open access using createobject, then this code and then
open MDB
 
T

Tran Hong Quang

Thank you very much, Dennis,

I have database in Ms Access 2000 format. As you known, AccessXP and Access
2003 support Access 2000 format. I have one setup package for all Ms Access
versions.

This code:
Application.AutomationSecurity =msoAutomationSecurityLow

is supported only by Ms Access 2003. Compiling on Ms Access 2000 will raise
an error.

Is it possible to write a function supported by all Ms Access 2000, 2002,
2003, and if it detect Ms Access 2003, it will change Macro security to LOW.

By the way, I ran a function with above command with Ms Access 2003, the
Macro security level still be Medium.

Regards
Quang
 

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