ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Mouse Position (https://www.excelbanter.com/excel-programming/389738-mouse-position.html)

Jason Zischke

Mouse Position
 
Hi All

I was wondering if there is a function that give you the mouse position
because a have this one form I want to either double click a control on a
form and to position a frame control beside the mouse?

Any Reply would be greatly appriecated.

Jason

NickHK

Mouse Position
 
Jason,
The various Mouse events (_MouseDown, _MouseMove, _MouseUp) give the
position of the Mouse:

Private Sub UserForm_MouseXXX(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)

End Sub

Of course, if this is over a control, that control will fire the events
rather than the form.

NickHK

"Jason Zischke" wrote in message
...
Hi All

I was wondering if there is a function that give you the mouse position
because a have this one form I want to either double click a control on a
form and to position a frame control beside the mouse?

Any Reply would be greatly appriecated.

Jason





All times are GMT +1. The time now is 05:18 PM.

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