VB code for the security warning message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have found this to put in somewhere to eliminate the security warning
message.

Dim o
Set o = CreateObject("Access.Application")
o.AutomationSecurity = 1 ' set macro security LOW.
o.OpenCurrentDatabase "full path to your database"
o.UserControl = True
Set o = Nothing

But where exactly do i put that in at?
 
Hi, Ben.
But where exactly do i put that in at?

Paste the VB Script into Notepad and save the file with a .VBS extension.
For example:

C:\Data\LowSecurity.VBS

Double-click the VB Script file name in Windows Explorer when you want to
open the database, and the Macro Security level will be set to Low, but only
for that session. The Windows Registry setting will not change.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 
Back
Top