I'm currently using the following code to open an access database, and then run a macro. I now want to apply a database password, but still have Excel open the database. Any ideas on how this can be done? I've checked and the OpenCurrentDatabase doesn't seem to have a password option.
Code:
Sub opendatabase()
DatabaseName$ = "C:\Test.mdb"
Set acApp = CreateObject("Access.Application")
acApp.Visible = True
acApp.OpenCurrentDatabase (DatabaseName$)
acApp.DoCmd.RunMacro "Mac-MacroName"
End Sub