Solved

Bolding selected text in a text box..

Posted on 2001-07-23
5
165 Views
Last Modified: 2010-08-05
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
0
Comment
Question by:kiprimshot
5 Comments
 
LVL 8

Accepted Solution

by:
Dave_Greene earned 50 total points
ID: 6310214
No, you will have to use a Richtext box

Then in code

With RTB1
  .SelBold = True  'changes selected text to bolded
End With
0
 
LVL 1

Expert Comment

by:daky
ID: 6310507
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
 
LVL 2

Author Comment

by:kiprimshot
ID: 6310770
daky:

yeah...... I know how to bold all text
0
 
LVL 2

Expert Comment

by:idorey
ID: 6311158
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
 
LVL 2

Author Comment

by:kiprimshot
ID: 6505376
sorry for the wait I havent been off for a while
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now