Clearing excel references

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Who is logging off what system?

Can you tell what line of code the error occurs on?

TC


Andrew Jones said:
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:
 
Back
Top