No code for changing background color excel vba mac

broken image

When writing code to change the color of any property listed in the preceding list, use the sytntax objectName.property = rgbColor where objectName is the name of the object to color, property is one of the properties that accepts a color, and rgbColor is a color defined as a VBA ColorConstant or expression that defines a color as a mixture of red, green, and blue. I ForeColor: Sets the color of text in controls that show text, such as a text box, combo box, or label

broken image

The exact color properties available to you depend on the object for which you're writing code, but some common coloring properties include i BackColor: Defines the background color of a text box, combo box, or form section i BorderColor: Sets the color of the border surrounding a control (providing that border isn't transparent) For example, if your payment is more than 30 days overdue, you might want to choose the amount due to show up in red (to call attention to the value). Such changes can be handy when you use color-coding to call attention to specific items on a form.

broken image

Your VBA code can change the color of objects on forms.