MouseOver, MouseDown, MouseUp

J

Jerry Hansen

I'm running Mac Excel v.X

I have a userform with an image on it called Image1. There is a
textbox called tbPeak In the form code, there is a handler for a
MouseOver even for this image:

Private Sub Image1_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, _
ByVal x As Single, ByVal y As Single)
tbPeak.Text = x & ":" & y
End Sub

When I run the form and place the mouse over the image, it reports (in
the text box) the x coordinate as being a number between 2 and 3.8899
(the image is 78 pixel wide. It reports the y cooridinate as being 0
no matter where I put the mouse over the image.

What am I doing wrong?

My goal is to allow the user to move the image around on the form to
graphically get input for a value.
 

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