Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Bolding selected text in a text box..

Posted on 2001-07-23
5
Medium Priority
?
175 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 8

Accepted Solution

by:
Dave_Greene earned 200 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

610 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