Check For Existing Instance
Posted: Tue Oct 15, 2024 9:48 am
Code: Select all
'this code would be in a bas module for start up.'
Private Sub main()
'Check for previous instance and exit if found.'
Dim rc As Long
If App.PrevInstance Then
rc = MsgBox("Application is already running", vbCritical, App.Title)
Exit Sub
Else
frmMain.Show
End If
End Sub