Mouse over query

J

Jason Zischke

Hi all,

I have a mouseover command on a few of my userforms to Unload the form when
the cursor moves outside the form however when the mouse moves too fast it
doesn't work see below for my code :

Private Sub UserForm_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
If x > 10 Then
Else
Unload Userform1
End If
If x < Userform1.Width - 20 Then
Else
Unload Userform1
End If
If Y < Userform1.Height - 20 Then
Else
Unload Userform1
End If
End Sub

Any help would be greatly appreciated.

Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top