G
Guest
I have some excel automation in an Access 2000 database. Everything seems to work fine but when anyone tries to log off their system and excel error occurs:
"The instruction at "0X..." referenced memory at "0X...." The memory could not be read.
Here is the code I have:
Dim appExcel As Excel.Application
Dim xlWkb As Excel.Workbook
Dim xlSht As Excel.Worksheet
Set appExcel = New Excel.Application
Set xlWkb = appExcel.Workbooks.Open("C:\myFile.xls")
Set xlSht = xlWbk.Sheets("Sheet1")
some code...
xlWbk.Close
appExcel.Quit
Set appExcel = Nothing
Set xlWbk = Nothing
Set xlSht = Nothing
Exit Sub
Any help someone could provide would be greatly appreciated
Thanks
Andrew
"The instruction at "0X..." referenced memory at "0X...." The memory could not be read.
Here is the code I have:
Dim appExcel As Excel.Application
Dim xlWkb As Excel.Workbook
Dim xlSht As Excel.Worksheet
Set appExcel = New Excel.Application
Set xlWkb = appExcel.Workbooks.Open("C:\myFile.xls")
Set xlSht = xlWbk.Sheets("Sheet1")
some code...
xlWbk.Close
appExcel.Quit
Set appExcel = Nothing
Set xlWbk = Nothing
Set xlSht = Nothing
Exit Sub
Any help someone could provide would be greatly appreciated
Thanks
Andrew