ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Variable control tip text (https://www.excelbanter.com/excel-discussion-misc-queries/33220-variable-control-tip-text.html)

Steve

Variable control tip text
 
Hi

On a userform, is it possible to have the control tip text for a text
box determined by the actual contents of the box?

The text box in question is next to a label "See also:". It would
contain the name of a state benefit and would fill via a VLOOKUP from a
combobox. I would like the control tip text to contain phone numbers
for the local benefit provider.

I know it can be done by VLOOKUPing to another label/text box, but I'm
being bloody minded and want it in the control tip.

Any advice on how to do so would be much appreciated.

For example, the combo box is selected to "Income Support." The label &
text box would then show "See Also:" "Jobseeker's Allowance" and the
control tip "Phone 01202 333xxx"

TIA

Steve


Bob Phillips

Steve,

here is a very simple example. I would expect you to get the data from a
table, but it should show the technique

Private Sub ComboBox1_Change()
Select Case ComboBox1.Value
Case "Income Support":
TextBox1.text = "Jobseeker's Allowance"
TextBox1.ControlTipText = "Phone 01202 333xxx"
Case "Housing Support":
TextBox1.text = "Hosuing B enefit"
TextBox1.ControlTipText = "Phone 01202 345xxx"
End Select

End Sub


BTW I see you are in Poole/Bournemouth. So am I, if you want any direct
help, I would be glad to give it for the old DHSS.

--
HTH

Bob Phillips

"Steve" wrote in message
oups.com...
Hi

On a userform, is it possible to have the control tip text for a text
box determined by the actual contents of the box?

The text box in question is next to a label "See also:". It would
contain the name of a state benefit and would fill via a VLOOKUP from a
combobox. I would like the control tip text to contain phone numbers
for the local benefit provider.

I know it can be done by VLOOKUPing to another label/text box, but I'm
being bloody minded and want it in the control tip.

Any advice on how to do so would be much appreciated.

For example, the combo box is selected to "Income Support." The label &
text box would then show "See Also:" "Jobseeker's Allowance" and the
control tip "Phone 01202 333xxx"

TIA

Steve




Steve

BTW I see you are in Poole/Bournemouth. So am I, if you want any direct
help, I would be glad to give it for the old DHSS.


It's worse than that... it's the Poole council! :)

Cheers Bob. I'll probably call on you for the latest dumb scheme - I
mean project - they give me.

Steve


Steve

BTW I see you are in Poole/Bournemouth. So am I, if you want any direct
help, I would be glad to give it for the old DHSS.


It's worse than that... it's the Poole council! :)

Cheers Bob. I'll probably call on you for the latest dumb scheme - I
mean project - they give me.

Steve



All times are GMT +1. The time now is 02:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com