Hi Katherine,
If you always want the contents of the textbox to be formatted that way, you
can set the formatting at design time and you won't need any code. Select
the textbox, go to the Properties pane, and click the Font item. A button
with "..." appears to the right of the font name; click it to open the
standard Font Properties dialog. Choose whatever formatting you want --
font, weight, size, color -- and click OK.
You need code in a Click() procedure or in the TextBox1_Change() procedure
only if you want to change the formatting depending on some other
condition -- for example, only if the text is too long, or contains certain
characters.
If you want only part of the text in the box to be italic or bold, I don't
think that's possible in an ordinary textbox. There's a type of control
called a Rich Edit textbox, which has much more formatting flexibility.
Unfortunately, you can't use the Microsoft Rich Edit control in recent
versions of Office because it isn't secure, and VBA won't let you place one
on a userform. You may be able to find a signed Rich Edit control from a
third-party vendor.