Clearing excel references

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
 
T

TC

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:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top