ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Test if Lotus Notes open (https://www.excelbanter.com/excel-programming/294260-test-if-lotus-notes-open.html)

max

Test if Lotus Notes open
 
Does anyone have any VBA code to test if Lotus Notes application is running

TI



AA2e72E[_2_]

Test if Lotus Notes open
 
Have a look at the FindWindow API call.

I do not have Lotus Notes: if its caption is not volatile or its class is known, FindWindow will return its handle.

AJW

Test if Lotus Notes open
 
Try this:

Sub LotusNotes_Running()
Application.ScreenUpdating = False
On Error Resume Next
AppActivate "Lotus Notes"
If Not Err.Number = 0 Then
Err.Clear
MsgBox "Notes is Not Running", vbInformation
Else
'your code to run here is Notes is open
End If
End Sub

Regards

AJ

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 01:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com