Hello,
I currently have a macro set up in Excel which calls a macro within an Access database which is linked to my excel tables. The only issue is that when the Access database opens, it asks for a password which I have to manually enter. I would like end users to be able to come in and refresh the queries without having to enter a password. Is there a way to bypass this through VBA? Here is my current code:
I appreciate the help.
Sub accessrunmacro()
Dim A As Object
Set A = CreateObject("Access.Application")
A.Visible = False
A.OpenCurrentDatabase ("database location.mdb")
A.DoCmd.RunMacro "macro name"
A.CloseCurrentDatabase
A.Quit
Set A = Nothing
End Sub
Moderator Message: Please use code tags when providing VBA. I have added them for you today as you are new to the forum. Please read our rules and comply in the future.
Bookmarks