I'm working on a VBA enabled spreadsheet and was hoping to use ToolTips to offer users help... can anyone offer away to use ToolTips (bubble help info that appears under a button after your mouse rests over it) with VBA.
The controltiptext property works nicely on form controls, but is not available for OLEObjects on the worksheet. In that case, you can program a workaround using worksheet events, something like:
Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
ActiveSheet.Shapes("ToolTip".Visible = True
End Sub
Private Sub surround_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
ActiveSheet.Shapes("ToolTip".Visible = False
End Sub
Here, surround is a rectangle (an image control, in this particular case) with background color and line color set to "window background" that encloses the button control. The ToolTip object is a TextBox shape created using the drawing toolbar, formatted however you like. Rob
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.