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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disallow to start the application twice 1

Status
Not open for further replies.

RSX02

Programmer
May 15, 2003
467
CA
Hi
I would like to tell a message box to my user when he try to start my application when it is already started.
How can I do that?
Thanks in advance
 
Add this short snippet to the start of your Sub Main or beginning of executable code:

' Check for previous instance of program running
If App.PrevInstance = True Then
MsgBox App.ProductName & " is already running", vbOKOnly + vbExclamation, "Oops"
End
End If
 
wow! thanks very much.
that's working perfectly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top