وجدت هذا الكود الرائع والذى يجعل المستخدم لا يستطيع فتح البرنامج مرتين فى نفس الوقت ويقوم بتنشيط النافذه التى تعمل
Function AnotherInstance() As Integer
Dim AppTitle$
If App.PrevInstance Then
' Hold the title of the application (title bar caption)
AppTitle$ = App.Title
' Change our application title
App.Title = "No longer want this app running..."
' Activate the previous instance
AppActivate AppTitle$
' Let calling procedure know another instance was detected
AnotherInstance = True
Else
' Let calling procedure know another instance was NOT detected
AnotherInstance = False
End If
End Function
Sub Form_Load()
' Don't want two copies of the program running at the same time
If AnotherInstance() Then End
' Note: that this routine will not work if the application's title changes
' (showing file names in the title bar for example).
End Sub



