LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 390
Default Procedure to detect if an application is running

I have the following procedure to detect if an application is running and
registers it:

Sub DetectExcel()
Const WM_USER = 1024
Dim hWnd as Long
hWnd = FindWindow("XLMAIN",0)
If hWnd = 0 Then
Exit Sub
Else
SendMessage hWnd, WM_USER + 18, 0, 0
End If
End Sub

This obviously applies to Excel. How do I accomplish the same thing in terms
of Word?

Thanks,
Bill
 
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
How to Dim the contents of a variable in running procedure? [email protected] Excel Discussion (Misc queries) 5 May 1st 07 12:34 AM
Problems calling a procedure in another application msk19[_3_] Excel Programming 1 September 14th 04 12:49 PM
Running Event Procedure When Cell Updated on Excel Worksheet Tom Ogilvy Excel Programming 0 August 19th 04 03:38 PM
running an password protected application arno Excel Programming 0 February 27th 04 07:26 AM
Problem in running an application Mohanasundaram[_2_] Excel Programming 0 August 5th 03 08:26 AM


All times are GMT +1. The time now is 11:57 PM.

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

About Us

"It's about Microsoft Excel"