简体   繁体   中英

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!!![在此处输入图片说明 ] 1

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:

在此处输入图片说明

and for the background colour:

在此处输入图片说明

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:

在此处输入图片说明

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 ! ;)

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM