Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Once again - ControlTipText 2

Status
Not open for further replies.

Mollethewizard

IS-IT--Management
Joined
Nov 18, 2002
Messages
93
Location
SE
I take the liberty to post my question once again. Maybe there are more users out there that got the same "problem"...

I’ve got a user form with some textboxes. One of the textboxes has a ControlTipText. Can I put some code in the user form so the ControlTipText appears when the user tabs to the textbox - enters the box?

I do know that the text appears when a user "hover the mouse" over the textbox as LPlates answered to my previous question. "My" users do not enter the particular textbox by clicking it. They tabs between the boxes.

Is there a way to get the ControlTipText to appear when a tab enters the text box?

Christer
 
You can't get the ControlTipText to appear that way becasue it will only appear when the user "hovers" over the control with the mouse pointer (check Excel VBA Help on that).

There is a trick that you can do though:

1. Create a Label on your form and set it's Visible property to False.
2. Format the Label to "look like" the ControlTipText
3. Using the Enter and Exit events of the TextBox you control the Visible property of the Lable

Code:
Private Sub TextBox2_Enter()
Displays the Label
Label1.Visible = True
End Sub

Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
' hides the Label
Label1.Visible = False
End Sub

I know that it seems to be a bit more difficult, but if you set it up right, it will look GREAT!!!

I hope this helps!!!


Peace! [peace]

Mike

Didn't get the answers that you wanted? Take a look at FAQ219-2884
 
Mike – why didn’t I think of that solution!

Even if it’s a little bit more coding it’s absolutely brilliant!

You really deserve the star I’ve give to you!

Thanks a lot!

Christer

 
Now I’ve created an information area in my user form. The area consists of a label that I bring alive when the user enters the textbox and put asleep when he/she exits the box.

I can use the label for more text boxes by changing the caption of the label for each box.

Once again, brilliant, Mike!

Christer
 
Glad I could help!



Peace! [peace]

Mike

Didn't get the answers that you wanted? Take a look at FAQ219-2884
 
^^^ Bump ^^^



Peace! [peace]

Mike

Didn't get the answers that you wanted? Take a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top