Es mucho mas facil.....creando y comprobando Mutex va que chuta...
Look this:
''Code by Adam Verwijs
Const ERROR_ALREADY_EXISTS = 183&
Private Declare Function CreateMutex Lib "kernel32" Alias "CreateMutexA" (lpMutexAttributes As Any, ByVal bInitialOwner As Long, ByVal lpName As String) As Long
Private Declare Function ReleaseMutex Lib "kernel32" (ByVal hMutex As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Sub Form_Load()
Dim hMutex As Long
''Try to create a new Mutex
hMutex = CreateMutex(ByVal 0&, 1, App.Title)
''Did the mutex already exist?
If (Err.LastDllError = ERROR_ALREADY_EXISTS) Then
''Clean up
ReleaseMutex hMutex
CloseHandle hMutex
''More than one instance detected
MsgBox "More than one instance"
End
Else
''form load code
End If
End Sub
Un Saludo.