EXCEL continues to run because you're using ActiveSheet and ActiveCell
references in your code (and perhaps there are other uses of unqualified
references). Those references cause ACCESS to instantiate additional
instances of EXCEL because they are not fully qualified through object
references that you created in your code.
See these Microsoft Knowledge Base articles for more information about this
"phenomenon":
INFO: Error or Unexpected Behavior with Office Automation When You Use Early
Binding in Visual Basic (see the topics "The Problems in Using Unqualified
Code with Office" and "Qualifying the Code to Avoid Errors"):
http://support.microsoft.com/kb/319832/
http://support.microsoft.com/default...b;en-us;178510
http://support.microsoft.com/kb/199219/en-us
--
Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/
"Pendragon" <(E-Mail Removed)> wrote in message
news:C36038CB-BE86-4A2D-B834-(E-Mail Removed)...
> Well, I thought maybe MS Updates were a possible solution. They weren't,
> but
> in having to reboot, I did discover my original code worked.
>
> Here's what I found:
>
> I'm using the fIsAppRunning function to either Create Excel object or Get
> Excel object. When the process runs and I finish up and close/exit Excel,
> there is still an Excel process running (as I see in Task Manager). After
> making some programming adjustments, the code eventually bombed out
> because
> either a) I needed to compact & repair (which I usually do anyway so
> Access
> doesn't crash as it likes to), or b) close the Access application
> altogether.
> When I didn't close Access and continued to run test after test, I started
> getting a "remote machine could not be reached" error.
>
> If I compact frequently and every now and then close and restart my
> Access,
> I am not having any problems.
>
> btw Ken, making your changes did allow the code to run, but the offsets
> did
> not return the results I needed and that would have been a major overhaul
> to
> recalculate. So I'm glad I figured this out.
>
> Still don't know why Excel is still running even though I've done a FILE
> CLOSE in Excel, but my code works, so I guess I don't care for now.....
>
> Thanks gentlemen!