fMouseOverCurrent()...
Sometimes you have a Form that has a few Command Buttons but you don't want to have an actual button showing. While you could just use the Background Hover Color, here's another way to show Users where the mouse is.
This Function will allow a bullet to show to the left of the control the mouse is hovering over.
The difficult I do immediately, the impossible takes a little bit longer.
Function fMouseOverCurrent(str As String)
On Error Resume Next
If str = "None" Then
Me.imgBullet.Visible = False
Else
Me.imgBullet.Visible = True
Me.imgBullet.Top = Me(str).Top
Me.imgBullet.Left = Me(str).Left - 220 'Twips
End If
End Function
VBA
To use copy and paste the below code into your modUtilities or a new Module (Remember don't name the Module the same as the Function name.) Then in the On Mouse Move line in the Properties Window for each Control you want to apply the bullet to place...
Control |
On Mouse Move (in Properties Windows) Place |
imgBullet |
=fMouseOverCurrent("None") |
cmdInvoice |
=fMouseOverCurrent("cmdInvoice") |
cmdPayments |
=fMouseOverCurrent("cmdPayments") |