Question Access 2007: Enable Macros on Startup

Dave_cha

Registered User.
Local time
Today, 00:19
Joined
Nov 11, 2002
Messages
119
Hi,

Has anyone figured out if it's possible to enable vba macros on startup using a script? In Access 2003 I used application.setoption to tweak a number of application parameters though I'm not sure if I can use this to enable macros in 2007.

I know that I can manually enable macros through the trust center and I could also add a trusted location (could prob. also automate a registry update to do same). My preference though is to enable all macros using a script as over 600 users will, on occasion, use these databases and I don't want to spend my days telling people how to enable macros.

Any help would be appreciated.

Thanks,

Dave
 
Last edited:
In Access 2003 I used application.setoption to tweak a number of application parameters though I'm not sure if I can use this to enable macros in 2007.
Have you tried looking it up in the help menu? type in application.setoption and see if it tells you how. I have 2007 but I am keeping myself from configuring the setup files right now, so I can't tell you if it's there, but it should be, or at least something similar. Check it out...
 
Access 2007: Enable Macros on Startup - Solution

I'm afraid the help menu wasn't much help aside from highlighting the option via the trust center.

I have figured it out though. The change required is registry based so I've added the following lines to my startup script...

Dim ChangeReg
Set ChangeReg = CreateObject("WScript.Shell")
ChangeReg.regwrite "HKCU\Software\Microsoft\Office\12.0\Access\Security\VBAWarnings", "1", "REG_DWORD"

Hopefully this will help someone else.

Rgd's,

Dave
 
Re: Access 2007: Enable Macros on Startup - Solution

I'm afraid the help menu wasn't much help aside from highlighting the option via the trust center.

I have figured it out though. The change required is registry based so I've added the following lines to my startup script...

Dim ChangeReg
Set ChangeReg = CreateObject("WScript.Shell")
ChangeReg.regwrite "HKCU\Software\Microsoft\Office\12.0\Access\Security\VBAWarnings", "1", "REG_DWORD"

Hopefully this will help someone else.

Rgd's,

Dave



Love you DAVE, i was looking for this kind of script from long time

please don't mind , feeling are coming from heart


Rgd's,

Danward
 
Hi all!

Can someone guide me how to implement this?

Where to put this code and how to get it run...

THNX
 
Re: Access 2007: Enable Macros on Startup - Solution

I'm afraid the help menu wasn't much help aside from highlighting the option via the trust center.

I have figured it out though. The change required is registry based so I've added the following lines to my startup script...

Dim ChangeReg
Set ChangeReg = CreateObject("WScript.Shell")
ChangeReg.regwrite "HKCU\Software\Microsoft\Office\12.0\Access\Security\VBAWarnings", "1", "REG_DWORD"

Hopefully this will help someone else.

Rgd's,

Dave

the only problem i see here is where users may be using an older version of access. the path in the registry would be different.

perhaps a workaround can be made by detecting the version and applying the correct path. having said that - it would need to be upward and backward compatible.
 
Hi all!

Can someone show me Where to put this code and how to get it run:
Dim ChangeReg
Set ChangeReg = CreateObject("WScript.Shell")
ChangeReg.regwrite "HKCU\Software\Microsoft\Office\12.0\Access\Securi ty\VBAWarnings", "1", "REG_DWORD".
ihave access application who start from one menu form.
thx
 
Re: Access 2007: Enable Macros on Startup - Solution

I'm afraid the help menu wasn't much help aside from highlighting the option via the trust center.

I have figured it out though. The change required is registry based so I've added the following lines to my startup script...

Dim ChangeReg
Set ChangeReg = CreateObject("WScript.Shell")
ChangeReg.regwrite "HKCU\Software\Microsoft\Office\12.0\Access\Security\VBAWarnings", "1", "REG_DWORD"

Hopefully this will help someone else.

Rgd's,

Dave

Can you tell me how to add to my startup script?
Thanks for your help!
 
If you'd like to execute a macro on startup, name it "autoexec".
 
wouldn't changing the registry item require the user to have admin permissions on their box? this isn't feasible if your IT dept is worth their salt and doesn't let average users have admin rights to their boxes.
 

Users who are viewing this thread

Back
Top Bottom