Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I detect if my application is already running?

Status
Not open for further replies.

GZook

Programmer
Apr 14, 2003
42
US
I don't want the program to be run on top of another copy of itself. I want something simple to place at the very start of my Main procedure. My application has no forms.

I picture a simple If structure as follows:

Code:
If ______________ Then
    lRetVal = MsgBox("Program is already running.",vbOkOnly)
    End
End If

Help me fill in the blank.
 
Thanks to both of you for your answers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top