Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Frankie Adams   on Jan 19 In MS Office Category.

  
Question Answered By: Vidhya Iyer   on Jan 19

In the vba  window (or form design window) right-click on the textbox  and
select "View Code"
the right-upper pull-down probably is at the "change" event.
Pull down to the MouseMove event.
It will create a new event.

For a textbox called "machno" I created:
Private Sub Machno_MouseMove(ByVal Button As Integer, ByVal Shift As Integer,
ByVal X As Single, ByVal Y As Single)
Application.StatusBar = "X = " & X & ", Y = " & Y
End Sub

Which continually updates the Status bar with the X and Y position of the mouse.

Be careful, this continually calles the macro  while the mouse  is in motion!
if you do much with this macro, it may become unwieldy!

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 


Tagged: