Hi all,
I have a question regarding a script i'm using.
The following script is set to launch an msaccess macro:
The problem i'm having is, that after the script makes the workbook close at the end, the script still seems to be running in the background somehow for a quite a long time. Cause when i re-open the excelfile that contains the script, it freezes at opening, and sometimes i can still see the "Working in MsAccess" in the statusbar.
Is there a way to end the script totally when arriving to the "thisworkbook.close"-part?
I've been stuck with this for a long time now but can't find a solution.
Any help is very much appriciated.
I have a question regarding a script i'm using.
The following script is set to launch an msaccess macro:
Code:
Sub GetAccess()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Application.StatusBar = "Working in MS Access"
Dim MyAccess As Object
Set MyAccess = CreateObject("Access.Application")
MyAccess.OpenCurrentDatabase ActiveWorkbook.Path & "\database.mdb", False, "Mypassword"
MyAccess.DoCmd.RunMacro "Run"
MyAccess.Quit
Application.StatusBar = ""
ActiveWorkbook.Save
ThisWorkbook.Close
Application.ScreenUpdating = True
End Sub
The problem i'm having is, that after the script makes the workbook close at the end, the script still seems to be running in the background somehow for a quite a long time. Cause when i re-open the excelfile that contains the script, it freezes at opening, and sometimes i can still see the "Working in MsAccess" in the statusbar.
Is there a way to end the script totally when arriving to the "thisworkbook.close"-part?
I've been stuck with this for a long time now but can't find a solution.
Any help is very much appriciated.