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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Higlight variables in a string

Status
Not open for further replies.

Pekka

Technical User
Mar 19, 2002
107
FI
Hi,
is there any way how I could higliht the variables in a string? I mean if I have:
uniik = "Arvoja:" & " " & ListBox1 & " " & "loytyi " & vast & " " & "kpl"
I would like it to brings ListBox1 and vast as bold formatted.


Pekka

"every dog will have his day"
 
In the VBE: Tools > Option > Editor Format. Play with Indentifier. There is no format choices for variables only.

Gerry
 
Assuming this is for Excel (you didn't actually say), and you are wanting to display this in a cell, it is possible (by exploiting the .Characters property).

If you are wanting to display this in a TextBox on a Form, I'm afraid you will have to use some other technique. For example, you could use five separate TextBoxes and dynamically set their Left and Width properties to give the appearance you want. If you use a Frame, with a little work and the correct property settings, you can make it look like a single TextBox.

Tell us a little more about what it is you are really trying to do and you can probably get more specific advice.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top