ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Mouse over query (https://www.excelbanter.com/excel-programming/368495-mouse-over-query.html)

Jason Zischke

Mouse over query
 
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


All times are GMT +1. The time now is 07:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com