View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Tooltip text over a label

John,

This is a little simpler, it's not perfect, but it may
meet your needs.
Using an ActiveX label from the Control Toolbox,
set Wordwrap to False and Autosize to False.
The number "100" in the code is the width of the label.
Adjust to the actual width of your label.
Add the code to the Worksheet module.

'--------------------------------------------
Private Sub Label1_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
If X 100 Then
Label1.AutoSize = False
Label1.Width = 100
Else
Label1.AutoSize = True
End If
End Sub
'-----------------------------------------------

Regards,
Jim Cone
San Francisco, USA


"John Robinson" wrote in message
om...
Is it possible to display a tool tip-text type label as the mouse
hovers over a label on an excel sheet. I can get a msgbox to come up
using Mousemove or click, but that requires a user interaction to
remove it. I would like a simple tiptext type message to appear as one
hovered over it and disappear as one moved on. Labels don't seem to
have this property.
My problem is a small label, which sometimes holds a long address and
I would like to be able to display it all as one hovers over it.
Thanks in advance for any help!