View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Pierre Archambault Pierre Archambault is offline
external usenet poster
 
Posts: 35
Default To show the whole text in a tooltip text

Wow !

Who told you that the text that goes in the textBox was 25 characters long ?



"RB Smissaert" a écrit dans le message de
...
Private Sub TextBox1_Change()

If Len(TextBox1) 25 Then
TextBox1.ControlTipText = TextBox1
Else
TextBox1.ControlTipText = ""
End If

End Sub

RBS


"Pierre Archambault" wrote in message
.. .
Hi,

I have UserForm which contains a textBox which cannot always display all
of
its content because the width of the textBox is limited by my program. I
would like to give the user the possibility to see all of its content by
showing a tooltip text like the one we have when for instance, the left
window of Windows Explorer isn't wide enough to show its whole content.
When
the mouse passes over the truncated text, we can see it in that tooltip
text. Is there a way we can do the same in Excel ?

I dont want to always show that tooltip text: it would not be usefull
when
the text is short enough to be visible in the textBox. I don't want

either
the textBox to be multiline neither have a scrollbar; its height must be
fixed at 1 line.

Thanks.

Pierre