LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Referenz to running excel application

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel still running in task manager after closing the application Willem Excel Discussion (Misc queries) 0 December 5th 06 01:56 PM
Running Excel 2000 VBA Application on Excel 2003 Excel Worksheet Functions 0 August 8th 06 06:04 PM
Excel VBA Macro Running DOS Application !! monir Excel Programming 11 June 26th 06 03:59 AM
Running excel as an application John[_98_] Excel Programming 8 December 20th 04 06:31 PM
Find all running Excel Application objects news.bluewin.ch Excel Programming 3 February 13th 04 10:28 PM


All times are GMT +1. The time now is 03:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"