I`m using this code to wait for a click from the user to pause and continue the program. On some PC's it doesnt work, any idea why ? also how do i detect if its clicked on a particular form ?


Public Sub Wait4Click()
Dim press As Boolean
press = False

Do
DoEvents
If GetAsyncKeyState(1) <> 0 Then press = True
If press = True And (1) = 0 Then Exit Sub
DoEvents
Loop

End Sub