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

VBA code to make a string BOLD

Status
Not open for further replies.

tmabrouk

Programmer
Aug 8, 2001
2
US

What's the VBA code to make a string bold, not a whole text field, just a string by itself .
 
You can not (as I am aware of) make a certian portion of a text box bold. You will need to use the active x RichTextBox control in order to acheive this. If you use a TextBox it is all or nothing

hth
Scott ::) Become better informed. Lean from others' mistakes. You could not live long enough to make them all yourself."
-- Hyman George Rickover (1900-86),
 
You can set a textbox's bold property using the FontWeight property, but as Scoty pointed out you can only make the whole string within the textbox bold, not a portion of it.

MyTextbox.FontWeight = 700 '700 is bold

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top