 |
TheDog Level: Protégé
 Registered: 27-09-2005 Posts: 4
|
destroying instances of Excel
I currently use:
myHwnd = FindWIndow("XLMAIN", 0)
To find the handle of the window containing an instance of excel for my use after opening an instance of Excel.
Then I use:
xlapp.Quit
tmpBoolean = xlapp.DestroyWindow(myHwnd)
To close the instance.
It works great the task bar shows the instance does in fact disappear.
My problem is that when I use:
myHwnd = FindWIndow("XLMAIN", 0)
agein to dectect if any further nstances are open, I get the handle of the supposedly destroyed instance again and not "0" which I would expect if the instance were truely destroyed.
Is there some "refresh" type function I need to run after closing an unused instance and destroying its window, so the FindwIndow function will stop returning the destroyed windows handle, making me think it still is in existance when it is not.
|
|
05-10-2005 at 02:18 PM |
|
|
|
|
 |
 |