[AccessD] Excel object behavior

McGillivray, Don [IT] Donald.A.McGillivray at sprint.com
Wed Sep 24 15:42:50 CDT 2008


Shamil,

My app runs in a Windows Terminal Services environment.  Each user gets a separate session, and only my app runs in that session (it's configured to prevent access to the desktop or any other apps).  If an Excel instance exists in that session, my app created it.  I noticed after the complaint (using the Task Manager in an admin session on the server) that the user's session had a ghost instance of Excel.

Does that make sense?

Don

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov
Sent: Wednesday, September 24, 2008 12:15 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Excel object behavior

<<<
...noticed that they had...
>>>
Don,

1) they had, or
2) using the same MS Access/VBA => MS Excel Automation code you were getting
such ghost instances on customers PCs while you didn't have such ghost
instances on your development/test PCs

?

--
Shamil

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of McGillivray, Don
[IT]
Sent: Wednesday, September 24, 2008 10:08 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Excel object behavior

Shamil,

Well, I don't know if I have a problem or not.  I was trying to troubleshoot
a user complaint, and noticed that they had a ghost instance of Excel.  When
I stepped through the code, I noticed that the timing of the "death" of the
instance didn't coincide with the setting of the final pointer to Nothing.
When I did a simple test procedure that started and terminated an Excel
instance, I noticed that the instance died immediately upon setting it to
nothing.  So it leads me to think that the user's complaint might be related
to the way the objects are being terminated.  I don't understand much about
that (though, thanks to your help I now understand more) so I raised the
question to the experts.

Thanks again for taking time to respond to my musings . . .

Don

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil
Salakhetdinov
Sent: Wednesday, September 24, 2008 9:33 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Excel object behavior

Don,

I'm not sure I understand what is the issue? - if you tell that "the
instance DOES go away" but in the same time you tell that you're
"overlooking a pointer somewhere that needs to be set to Nothing."...

I mean if MS Excel instance does go away - that's OK IMO, and everybody
should be happy even without setting all the pointers to nothing :)...

What am I missing?

Thank you.

--
Shamil

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of McGillivray, Don
[IT]
Sent: Wednesday, September 24, 2008 7:46 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Excel object behavior

Shamil,

Thanks for the detailed explanation.  And yes, I was watching the processes
tab of the task manager.  I was careful to make sure that there were no
Excel instances present before running the procedure.  As I step through the
part of the code that cleans up (closing workbooks, quitting Excel, setting
pointers to Nothing, etc.) the instance remains on the processes list.  Only
upon execution of the "Exit Function" line of the procedure does the
instance disappear - but the instance DOES go away, it doesn't remain a
ghost.

I suspect that I'm overlooking a pointer somewhere that needs to be set to
Nothing.  I thought I got them all, but maybe not . . .

Don


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com






More information about the AccessD mailing list