Bolding selected text in a text box..

I have a paragraph table that has codes and text.  I want to be able to allow the user to enter in the paragraph and bold the necessary text at the vb end.  Can I use a regular text box and give them a bold button similar to word.

Can I do this and save it to sql server.  The paragraphs are used in a word merge.

Thanks
LVL 2
kiprimshotAsked:
Who is Participating?
 
Dave_GreeneConnect With a Mentor Commented:
No, you will have to use a Richtext box

Then in code

With RTB1
  .SelBold = True  'changes selected text to bolded
End With
0
 
dakyCommented:
You can not mark only one word, and bold it. But, you can Bold whole text! Use code like this:

Private Sub Command1_Click()
Text1.FontBold = True
End Sub

It's pretty easy, isn't it? (and it works in regular textbox!)
Best regards, Daky
0
 
kiprimshotAuthor Commented:
daky:

yeah...... I know how to bold all text
0
 
idoreyCommented:
IN an RTF box you can set individual words to bold. I have done this but sometimes (I dont know why) it get a bit flaky.

Use SelStart to find the start of the work/phrase you want bold. Use SelLength to select that word or phrase.

You can then use the SelBold command to set that selection to bold.

Good Luck
0
 
kiprimshotAuthor Commented:
sorry for the wait I havent been off for a while
0
All Courses

From novice to tech pro — start learning today.