Barry Wang
Barry Wang

Reputation: 101

Excel VBA Userform Font color change

I took over a userform from others (this form is made by Excel VBA). I noticed that guy created two textbox, one's background is in white, another one is in black. However I want to make all the textbox's background in white but I don't know how to change the font color inside of textbox. I want to change font color into black(like the left textbox) of the right textbox showed below. Could anyone help me?Thanks a lot!!![enter image description here]1

Upvotes: 2

Views: 20153

Answers (2)

Nick
Nick

Reputation: 3845

Open the VBA editor and select your textbox.If the properties window on the bottom left of your screen is not visible, hit F4 or select the "View" menu at the top of the editor and select properties window.

With your textbox still selected, the option you need to change the font colour is shown:

enter image description here

and for the background colour:

enter image description here

Both colours can be selected on the colour pickup that pops up when you click on the dropdown arrow next to the property, so you dont need to memorise these values.See below:

enter image description here

Upvotes: 2

R3uK
R3uK

Reputation: 14537

In VBE, when you are in UserForm edition, select the textbox you want to change.

You'll find that Properties panel (generally in the bottom left corner of VBE) or right click and Properties

You'll need to change BackColor and ForeColor! ;)

enter image description here

Upvotes: 1

Related Questions