How do I make the help tips appear when I position the cursor over a textbox , or any other control?
Code? or can I do it directly in the properties manager of the textbox? How?
Thank you
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » help tips when mouse over text box (2002)
I am by know means an expert, I do NOT think there is a DIRECT way to do this.
The only way I know to do this (using the adage, if you don’t know an easy way, do it the difficult way) is to add a label on where you want the “tooltip” to be. Add text and format (size, color, etc) as desired
Then in the “mousemove” event of the texbox add this code
Private Sub TextBox1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, _ ByVal X As Single, ByVal Y As Single) Dim sSens As Single Dim sXLo As Single Dim sXHigh As Single Dim sYLo As Single Dim sYHigh As Single Dim oTip As Object Dim obj As Object sSens = 0.1 Set oTip = Label1 Set obj = TextBox1 sXLo = obj.Width * sSens sYLo = obj.Height * sSens sXHigh = obj.Width * (1 - sSens) sYHigh = obj.Height * (1 - sSens) If X > sXLo And X sYLo And Y < sYHigh Then oTip.Visible = True Else oTip.Visible = False End If End Sub
It will unhide when the mouse is in the “center area” of the textbox and hide it when it gets near the border. The width of the change is determined by the “sensitivity” (sSens) which is set at 10% of the width/height. if too small you might not rehide the tip if you move over the textbox really fast.
Change the objects as appropriate.
Steve
I am just a chemist, who plays with excel. There is a lot I use (and am fairly knowledgeable in), there are items I know about, and have to think about them, and there are things I have never seen but I have heard about, and there are things I have never seen and am not sure they exist.
There are the occasional example of these “can they be done” items, that I knew of no direct way, and have done a workaround and then someone gives an easier way. Look at post 295925 and my algebraic solution to an existing “built-in” function. (at least my algebra was correct).
Maybe a “real excel expert” will tell us how to do it easily!
Steve
I will try your advice.
In the mean time, I wrote a short piece of code that did the trick:
Private Sub x_spacing_GotFocus()
Dim message As String
message = “If transpose direction is 1:” & vbCrLf
message = message & vbTab & “X spacing will set the control point spacing WITHIN the new ribs” & vbCrLf
message = message & vbTab & “Y spacing will define the distance among ribs” & vbCrLf
MsgBox message
End Sub
Its primitive, doesnt have the font formatting, and it is very annoying if you have to correct the values you typed in the textbox very often (the msgbox will pop up every time you select the textbox)… but it did the job too!
I have a high school degree in chemistry… does that help?
I will try your advice.
In the mean time, I wrote a short piece of code that did the trick:
Private Sub x_spacing_GotFocus()
Dim message As String
message = “If transpose direction is 1:” & vbCrLf
message = message & vbTab & “X spacing will set the control point spacing WITHIN the new ribs” & vbCrLf
message = message & vbTab & “Y spacing will define the distance among ribs” & vbCrLf
MsgBox message
End Sub
Its primitive, doesnt have the font formatting, and it is very annoying if you have to correct the values you typed in the textbox very often (the msgbox will pop up every time you select the textbox)… but it did the job too!
I have a high school degree in chemistry… does that help?
I am just a chemist, who plays with excel. There is a lot I use (and am fairly knowledgeable in), there are items I know about, and have to think about them, and there are things I have never seen but I have heard about, and there are things I have never seen and am not sure they exist.
There are the occasional example of these “can they be done” items, that I knew of no direct way, and have done a workaround and then someone gives an easier way. Look at post 295925 and my algebraic solution to an existing “built-in” function. (at least my algebra was correct).
Maybe a “real excel expert” will tell us how to do it easily!
Steve
I am by know means an expert, I do NOT think there is a DIRECT way to do this.
The only way I know to do this (using the adage, if you don’t know an easy way, do it the difficult way) is to add a label on where you want the “tooltip” to be. Add text and format (size, color, etc) as desired
Then in the “mousemove” event of the texbox add this code
Private Sub TextBox1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, _ ByVal X As Single, ByVal Y As Single) Dim sSens As Single Dim sXLo As Single Dim sXHigh As Single Dim sYLo As Single Dim sYHigh As Single Dim oTip As Object Dim obj As Object sSens = 0.1 Set oTip = Label1 Set obj = TextBox1 sXLo = obj.Width * sSens sYLo = obj.Height * sSens sXHigh = obj.Width * (1 - sSens) sYHigh = obj.Height * (1 - sSens) If X > sXLo And X sYLo And Y < sYHigh Then oTip.Visible = True Else oTip.Visible = False End If End Sub
It will unhide when the mouse is in the “center area” of the textbox and hide it when it gets near the border. The width of the change is determined by the “sensitivity” (sSens) which is set at 10% of the width/height. if too small you might not rehide the tip if you move over the textbox really fast.
Change the objects as appropriate.
Steve
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications