Paul Barrett
asked on
Access 2007 Enable All Macros using vba module
I am distributing an Access front-end 2007 db to 25 user profiles on a terminal server. This is done on a log-in script whereby the db is placed in a folder C:\Users\UserName\etc. So Username in folder string is always different.
I need to be able to automate setting macro securtiy to 'enable all macros' in a code module.
Can this be done or if not does someone have a way of setting a registry key through a code module that will do the same job for that user?
I need to be able to automate setting macro securtiy to 'enable all macros' in a code module.
Can this be done or if not does someone have a way of setting a registry key through a code module that will do the same job for that user?
I take it that each user have to log into the network using there username. It so all you have to do it set the access based on the username of the person logged in. You can accesss the network user name by the following code
Environ("username")
This also means that you don't have to set login in the database you just piggy back on the network login.
Environ("username")
This also means that you don't have to set login in the database you just piggy back on the network login.
I have almost 1000 Terminal Server users I support running Access apps..
Since this must be down by user, I use a log on script for all users that set the macro security level to low.
I use VBS to add the reg key.
If you would like, I can post the files.
Since this must be down by user, I use a log on script for all users that set the macro security level to low.
I use VBS to add the reg key.
If you would like, I can post the files.
Fully knocking down macro security might be overkill.
How about adding the location to the trust center.
If you go one layer higher than the user's name, you won't even need to know the username
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Softwar e\Microsof t\Office\1 4.0\Access \Security\ Trusted Locations\Location0]
"Path"="C:\Users\UserName\ etc"
"AllowSubfolders"=dword:00 000001
"Description"=""
"Date"="9/2/2010 6:10 PM"
How about adding the location to the trust center.
If you go one layer higher than the user's name, you won't even need to know the username
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Softwar
"Path"="C:\Users\UserName\
"AllowSubfolders"=dword:00
"Description"=""
"Date"="9/2/2010 6:10 PM"
ASKER
Hi gersinjansen as you were the first to respond I'm, running with yours at the moment. Can the registry key be set using vba module within my Access 2007 app?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
See the problem, until off would get warnings on startup of app, thanks I have enough to sort out this solution now.
[HKEY_CURRENT_USER\Softwar
"VBAWarnings"=dword:000000
Will enable all macro's without warnings for current user.