View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Count & Select Window

Edmund,

Here's the MS version:
http://support.microsoft.com/kb/175030

And similar in VB
http://vbnet.mvps.org/index.html?cod...entprocess.htm

And using WMI
http://codecomments.com/Visual_Basic/message738136.html

NickHK

"Edmund" wrote in message
...
VBA rookie here.

Is it possible to get VBA to count the number of active applications in
Windows? I don't mean counting the number of Excel workbooks opened within
the Excel application but the number of applications that are active

within
Windows itself. Say if I have launched Word, Notepad, Powerpoint, Excel

and
SAP application, the count should return 5.

If this is possible, then how can I also get it to Debug.Print each
applications' name?

Currentlly, I'm using sendkeys "%{TAB}" to tab to-and-fro the next
application. This is very dangerous. With your answer, I hope to get VBA

to
activate the intended application rather than using ALT+TAB.

Thanks in advance
--
Edmund
(Using Excel XP)