Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm Mouseover???
In my Userform, I have the following code making lables visible when
mouseover textbox. However, you have to go back to the label to hide it. So if your mouse even comes close to one of the other textboxes it will also be visible. Two labels can be visible at the same time. This doesnt work well with a two column frame. Can this be changed instead to make label visible when you click on the textbox and when you click again the label will be invisible? Can this be done? How would the code change?? Thank you. Private Sub UserForm_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label280.Visible = True Me.Label280.Visible = False Me.Label282.Visible = True Me.Label282.Visible = False Me.Label283.Visible = True Me.Label283.Visible = False Me.Label284.Visible = True Me.Label284.Visible = False Me.Label285.Visible = True Me.Label285.Visible = False Private Sub CheckBox470_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label280.Visible = True End Sub Private Sub CheckBox465_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label282.Visible = True End Sub Private Sub CheckBox467_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label283.Visible = True End Sub Private Sub CheckBox466_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label284.Visible = True End Sub Private Sub CheckBox468_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label285.Visible = True End Sub Private Sub Label280_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label280.Visible = False End Sub Private Sub Label282_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label282.Visible = False End Sub Private Sub Label283_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label283.Visible = False End Sub Private Sub Label284_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label284.Visible = False End Sub Private Sub Label285_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label285.Visible = False End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm Mouseover???
the way I got around this was to have each label 'above'another label.. this
underneath label was slightly larger and had no lines - essentialy you couldn't see it..BUT its mouse move was enables and it switched off whatever the higth label switched on. It meant that when you moved your mose over the 'main' label, it showed the info and when you moved off, yuo crorssed the 'invisible' label, which then hid the info. "TotallyConfused" wrote: In my Userform, I have the following code making lables visible when mouseover textbox. However, you have to go back to the label to hide it. So if your mouse even comes close to one of the other textboxes it will also be visible. Two labels can be visible at the same time. This doesnt work well with a two column frame. Can this be changed instead to make label visible when you click on the textbox and when you click again the label will be invisible? Can this be done? How would the code change?? Thank you. Private Sub UserForm_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label280.Visible = True Me.Label280.Visible = False Me.Label282.Visible = True Me.Label282.Visible = False Me.Label283.Visible = True Me.Label283.Visible = False Me.Label284.Visible = True Me.Label284.Visible = False Me.Label285.Visible = True Me.Label285.Visible = False Private Sub CheckBox470_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label280.Visible = True End Sub Private Sub CheckBox465_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label282.Visible = True End Sub Private Sub CheckBox467_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label283.Visible = True End Sub Private Sub CheckBox466_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label284.Visible = True End Sub Private Sub CheckBox468_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label285.Visible = True End Sub Private Sub Label280_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label280.Visible = False End Sub Private Sub Label282_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label282.Visible = False End Sub Private Sub Label283_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label283.Visible = False End Sub Private Sub Label284_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label284.Visible = False End Sub Private Sub Label285_MouseMove(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.Label285.Visible = False End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MouseOver | Excel Discussion (Misc queries) | |||
MouseOver Substitute in XL | Excel Programming | |||
mouseover-event | Excel Programming | |||
On MouseOver for Cells/Sheets | Excel Programming | |||
VLOOKUP with mouseover? | Excel Programming |