VBA Userform Textbox Font Change Specific Words

ExcelGuyDude

Board Regular
Joined
Feb 4, 2015
Messages
205
I've created a userform with a textbox inside with the following words:

"I'd like to BOLD and ITALICIZE these words."

How could I do that?

Thus far I've tried using InkEdit, but the issue I have there is when I attempt to edit the text within the InkEdit box, the InkEdit box disappears. It seems to be a common issue, so I'm trying to avoid the InkEdit Control.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi,

You did not list the words but try this.

Code:
Private Sub TextBox1_Change()


If TextBox1 = "This" Then
    With TextBox1
        .Font.Bold = True
        .Font.Italic = True
    End With
End If


End Sub

If I am understanding what you want that should work.

Greg
 
Upvote 0
Sorry, I would like the results to show up like this:


Rich (BB code):
I'd like to BOLD and ITALICIZE these words, and make this word BIGGER."

So not having everything inside the textbox one font style, but individual words inside the textbox to be Bold, or Italics, or larger size.
 
Upvote 0
Userform textboxes do not support Rich Text. All characters in a text box will have the same formatting.
 
Upvote 0
What other control is available that would do that functionality?
(Aside from InkEdit. I'm certain there's something out there that isn't as bug-infested as InkEdit)
 
Upvote 0
What other control is available that would do that functionality?
None of the standard user form controls support rich text.

Custom controls should be avoided if the workbook is going to be distributed to others, since the specialty controls may not be supported by the other machine.

Depending on your situation, you might want different text boxes, each with a different formatting.
Or perhaps different labels, if user entry into the box isn't desired.
 
Upvote 0

Forum statistics

Threads
1,215,327
Messages
6,124,290
Members
449,149
Latest member
mwdbActuary

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top