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

different coloured text, is it possible?

Status
Not open for further replies.

danwand

Programmer
Jun 8, 2003
100
GB
Hi,

Just wondering if it was possible to have text in either a label caption or a text box that has certain words in different colors.

So for example if i have a string variable in VBA:(dim strHelp as string) that has a value set to "you MUST enter a date"
(strHelp = "you MUST enter a date") which is set as the label caption or text box box value
(me.txtHelp = strHelp)

is it possible to have the word 'MUST' in red with the rest of the text in black?

Any help would be appreciated.
Dan
 
Within the same label, I would say no. However; you could setup two lables, one with the whole sentance and the other with just MUST. Then you could color that one Red and place it on top of the other lable, just over the word MUST.
 
Thanks for the reply Hneal,
The example i gave was a generalisation and wouldn't just apply to that one sentance with the word 'must' but could be any sentance with any number of different coloured text.
Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top