Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel interacting with another program, continued from 8/9/09 thre
Thanks for help so far - I'm getting close.
Using SendKeys, I send commands to another (non-Office) program that is activated. Its old window ("Aux Interval") disappears and is eventually (in 1 to 15 seconds) replaced with a new one ("Aux Interval - Steve") having info on the person named in the title bar. The new window still has the focus, so I don't need to activate it. How can I check when it appears so Excel can continue sending commands? Jacob Skaria wrote: --In order to check whether the the other application is open or not you can use FindWindow Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long lnRetVal = FindWindow("NOTES", vbNullString) If lnRetVal = 0 Then MsgBox "Application must be open", vbInformation, "App-Name" Exit Sub End If I am having trouble adapting this to my specific situation in Excel 2003. The computer is on a network with lots of other stuff running in the background. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel interacting with another program, continued from 8/9/09 thre
Hi Steve
Check out the below link on how to get a window handle without specifying an exact title... http://support.microsoft.com/kb/147659 If this post helps click Yes --------------- Jacob Skaria "Steve" wrote: Thanks for help so far - I'm getting close. Using SendKeys, I send commands to another (non-Office) program that is activated. Its old window ("Aux Interval") disappears and is eventually (in 1 to 15 seconds) replaced with a new one ("Aux Interval - Steve") having info on the person named in the title bar. The new window still has the focus, so I don't need to activate it. How can I check when it appears so Excel can continue sending commands? Jacob Skaria wrote: --In order to check whether the the other application is open or not you can use FindWindow Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long lnRetVal = FindWindow("NOTES", vbNullString) If lnRetVal = 0 Then MsgBox "Application must be open", vbInformation, "App-Name" Exit Sub End If I am having trouble adapting this to my specific situation in Excel 2003. The computer is on a network with lots of other stuff running in the background. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 interacting with another program | Excel Programming | |||
Interacting with 2 different excel files | Excel Discussion (Misc queries) | |||
Excel Capabilites when interacting with Outlook | Excel Programming | |||
Interacting with Excel open in IE | Excel Programming | |||
Interacting outside Excel | Excel Programming |