@
Star-Dust
It's not so and you obviously did not try my code. A logic maybe a little strange. But I will try to explain.
When user clicks first time (WaitClick = 0), the program sets WaitClick = 1 and falls asleep per 200 ms.
What happens further ...
a) If user does not click during sleep period, the subroutine wakes up, logs "Single" (because WaitClick = 1) and returns initial state (WaitClick = 0)
b) user clicks one time during sleep period.
In this case the program sets WaitClick = 2 and exits.
If WaitClick = 1 Then
WaitClick = 2
Return
End If
Note, that similar actions do not have relation to first instance, where we set Sleep (200).
First instance of Sub wakes up, sees WaitClick = 2, reports "Double" and returns initial state (WaitClick = 0)
c) user clicked more than one time during sleep period.
In this case rhe subroutine simply ignores click (when WaitClick = 2, a fragment If WaitClick = 1 Then does not work, but works If WaitClick <> 0 Then Return)