Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Count & Select Window
VBA rookie here.
Is it possible to get VBA to count the number of active applications in Windows? I dont 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, Im 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) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Count & Select Window
Probably mean
http://vbnet.mvps.org/index.html?cod...pprocesses.htm for the VB way. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "NickHK" wrote in message ... 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) |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Count & Select Window
Yeah, that's a bit more relevant.
NickHK "Bob Phillips" wrote in message ... Probably mean http://vbnet.mvps.org/index.html?cod...pprocesses.htm for the VB way. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "NickHK" wrote in message ... 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) |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Count & Select Window
Im really a rookie with VBA & almost no knowledge of VB.
Ive followed http://vbnet.mvps.org/index.htmlcode...pprocesses.htm , copied its codes into VBA & successfully run tested it where it return results on the €śprocesses€ť that are active in Windows. The results are exactly like what I get to see in Task Managers Tab #2. But this is not exactly what I needed. What I actually need is contained within Tab # 1 (tab named: Applications) in Task Manager. For example, say if there are 10 tasks listed in tab #1 of Task Manager, how can I get VBA to €śSwitch To€ť the task that I needed? (a) How can I get VBA to list down each tasks in a spreadsheet or by Debug.Print (the list of tasks in Task Manger Tab #1). (b) After achieving the above, how can I get VBA to €śSwitch To€ť the task of my choice? I need the above steps for assurance because my procedure will later be using SendKeys to perform data entry on a NON-MS Office based application. Im aware that [Application.SendKeys "%{TAB <repeatition #}", True] can help do the switching but its simply too dangerous because it does not verify if it has activated the intended screen. It will be a disaster if my data entry (via SendKeys) is consequently executed on the wrong screen. Thanking you in advance for the big favor. -- Edmund (Using Excel XP) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lost sum,count,averge,etc shortcut window | Excel Discussion (Misc queries) | |||
How to pre-select/highlite contents in input window. | Excel Programming | |||
How to stop the 'select sheet' window pop up | Excel Programming | |||
Select a sheet and activate a Window | Excel Programming |