Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Waiting for an external app to finish

I am using XL2003 on WinXP

I have a piece of code I call waiting for me to close down my email
client which I call from excel (it's not outlook so I can't do any fancy
object stuff) - basically I am doing a goto URL with a mailto link
prepared


Anyway this is the code I am using

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Function IsRunning(psTaskName As String) As Boolean

If FindWindow(vbNullString, psTaskName) < 0 Then
IsRunning = True
End If

End Function

Last time I know this was working was in August this year. Maybe a
WinXP update has changed the behaviour of the libraries? My program is
just looping round, even though I know the program isn't on the task
list,

Is there another way of doing this, and/or is there also a way of
listing all the windows running so I can at least try and work out what
the problem is please?
--
Mike News
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Waiting for an external app to finish

In message
at 00:31:52 on Mon, 7 Dec 2009, Mike
S wrote
I am using XL2003 on WinXP

I have a piece of code I call waiting for me to close down my email
client which I call from excel (it's not outlook so I can't do any fancy
object stuff) - basically I am doing a goto URL with a mailto link
prepared


Anyway this is the code I am using

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Function IsRunning(psTaskName As String) As Boolean

If FindWindow(vbNullString, psTaskName) < 0 Then
IsRunning = True
End If

End Function

Last time I know this was working was in August this year. Maybe a
WinXP update has changed the behaviour of the libraries? My program is
just looping round, even though I know the program isn't on the task
list,

Is there another way of doing this, and/or is there also a way of
listing all the windows running so I can at least try and work out what
the problem is please?

Slight update - it's something to do with the length of the task name,
but nothing's changed - the excel code, or the name of the task (which
is based on an ebay auction title - and I haven't changed any of the
lengths)

Anyway, I can probably work around it, although if there is a better
way, I'd love to hear from anyone

Cheers
--
Mike News
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
Waiting for a site in JAVA to finish loading Raz Excel Programming 0 January 23rd 09 09:51 PM
Giving some feedback to user, when waiting on SQL SELECT query to finish Morris[_2_] Excel Programming 2 September 20th 06 04:08 AM
Waiting... Rob Hargreaves[_2_] Excel Programming 1 August 7th 05 05:11 PM
Microsoft excel is waiting for other program to finish OLE Action Deepak[_4_] Excel Programming 1 November 13th 03 10:11 AM
waiting Mark Kubicki Excel Programming 2 August 7th 03 09:08 PM


All times are GMT +1. The time now is 09:00 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"