Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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
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 2003 interacting with another program Steve Excel Programming 4 August 10th 09 02:00 PM
Interacting with 2 different excel files Trups Excel Discussion (Misc queries) 0 August 9th 07 04:52 AM
Excel Capabilites when interacting with Outlook Corey Excel Programming 0 January 25th 07 02:04 AM
Interacting with Excel open in IE [email protected][_2_] Excel Programming 0 March 13th 06 12:54 AM
Interacting outside Excel Kevin Excel Programming 1 March 2nd 04 02:38 AM


All times are GMT +1. The time now is 11:47 AM.

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

About Us

"It's about Microsoft Excel"