Help displayed while hovering over a button

  • Thread starter Thread starter PhilM
  • Start date Start date
P

PhilM

Hi,

I need to have help display in my spreadsheet while the user is
hovering over a custom button. Much like a cell comment but on buttons,
any ideas?

Thanks
Phil
 
If on a userform, use the ControlTipText. If on a worksheet:

Put an image control (or another control that you can make to appear
invisible) on the worksheet just slightly larger than the commandbutton. Put
the commandbutton centered on the image control. Put your message in a label
control and make the label control visible = false. Then utilize the
mousemove event of the image control to hide the label and the mousemove
control of the button to make it visible.

Private Sub CommandButton1_MouseMove(ByVal Button _
As Integer, ByVal Shift As Integer, _
ByVal X As Single, ByVal Y As Single)
Label1.Visible = True
End Sub


Private Sub Image1_MouseMove(ByVal Button _
As Integer, ByVal Shift As Integer, _
ByVal X As Single, ByVal Y As Single)
Label1.Visible = False
End Sub
 

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

Back
Top