Hello,
I found this similar code in the newsgroups to find all running excel
applications:
lngHandle = GetWindow(GetDesktopWindow, GW_CHILD)
Do
strClassName = String(51, 0)
lngMaxCount = GetClassName(lngHandle, strClassName, 50)
If UCase(Left(strClassName, lngMaxCount)) = "XLMAIN" Then
'???
End If
lngHandle = GetWindow(lngHandle, GW_HWNDNEXT)
Loop While lngHandle < 0
Ok, that works. But now I want to get a reference to each of the
running instances to check which workbooks are open (please see the
questionmarks). I don`t know, how to get a reference to a running
"window".
Can anybody help me?
--
Peter Marchert
[EDV-Service Marchert]
Homepage:
http://www.marchert.de
Excel- und Outlookprogrammierung