Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings,
Using Excel 2003, have a userform with an image of the US States. What's a good way to show which state i am hovering over and have a mouse click event return the state name. I was trying to use the mouse move x, y, but this only works for me if the state is semi-square, unsure how to do it for Texas, California, Idaho, etc. code snipet... Private Sub Image1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) If Xval = 35 And Xval <= 51 And YVal = 16 And YVal <= 24 Then UserForm1.Caption = "Washington" Else If Xval = 32.25 And Xval <= 59 And YVal = 38.25 And YVal <= 56 Then UserForm1.Caption = "Oregon" Else UserForm1.Caption = X & " XVal" & " " & Y & " YVal" End IF End If Thank you RonS |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Mouse-Over State on Graphic Button | Excel Programming | |||
Mouse pointer position, excel2002 | Excel Programming | |||
mouse position in EXCEL | Excel Programming | |||
Mouse Position | Excel Programming | |||
position mouse cursor in msg box | Excel Programming |