How to close ALL instances of Excel
This code is to run in Excel VBA ?
You want to close your own instance ?
Depending on the above GetObject may not be the answer, as you cannot
stipulate which instance gets returned.
Maybe use the API FindWindow with "XLMAIN" and SendMesssage with "WM_CLOSE"
?
NickHK
"spIky haIred" wrote in message
oups.com...
Hi everyone,
I would like to close ALL instances of Excel... I am able to close all
workbooks within an instance of Excel but cannot close workbooks in
other instances of Excel... Is there a way to scan all open windows? Or
even better, to scan all open instances of Excel only?
Help would be much appreciated.
Thanks in advance,
Jason
|