I am running Microsoft Access 2010. I am referencing a COM object in my VBA project. This gives my application availability to DLL files that are used to update a proprietary system written in VB.Net.
The problem I am facing is that when I instantiate that object and then set it to nothing it is not removed from memory. This causes Access not to shut down properly and I have to go to the Windows Task manager to close down Access.
Does anyone know of a work around to this so Access will close down correctly? The way the COM objects is instantiated is as follows:
Public ASCRemote As ASC_Interface.ASCInterface
Public Sub Login(sUsrName As String, sPswd As String, sCompy As String, sAppwin As String)
Set ASCRemote = New ASCInterface
ASCRemote.DebugFlag = True
ASCRemote.LogFileDir = "D:\ASCLOG"
Call ASCRemote.Login(sUsrName, sPswd, sCompy, sAppwin)
End Sub
Public Sub Logout()
Call ASCRemote.Logout(TempVars!strUserName, TempVars!strCompany, TempVars!strAppwin)
Call ASCRemote.Dispose
Set ASCRemote = Nothing
End Sub