Hi all,
I have a script that is set to launch an ms access macro from within an excelsheet.
this is the code:
Now the database is password protected. Now each time i let the script run, i have to type the database password.
Is there a way to implement the database password in this script?
Many thanks in advance for your helps
I have a script that is set to launch an ms access macro from within an excelsheet.
this is the code:
Code:
Sub GetAccess()
Application.StatusBar = "Working in MS Access"
Dim MyAccess As Object
Set MyAccess = CreateObject("Access.Application")
MyAccess.OpenCurrentDatabase ActiveWorkbook.Path & "\database.mdb"
MyAccess.DoCmd.RunMacro "Run"
MyAccess.Quit
Application.StatusBar = ""
Application.DisplayAlerts = False
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub
Now the database is password protected. Now each time i let the script run, i have to type the database password.
Is there a way to implement the database password in this script?
Many thanks in advance for your helps