0 votes
in VBA by Beginner (6 points)
I mean changing font color and font size for a range to make the spreadsheet more appealing in VBA rather than volatile conditional formating.

1 Answer

0 votes
by Skilled (401 points)

You can use such lines to control the font properties

Sub Change_Font_Size_Name_Color()
    With ActiveSheet.Range("A1:C10").Font
        .Size = 16
        .Name = "Arial"
        .Color = vbRed
    End With
End Sub


by Beginner (0 points)

You can use the "Colorindex" attribute. This article goes into detail on how to use it to set colors, including a list of 56 values to set specific colors:


Here's an infographic with the VBA ColorIndex colors and predefined VBA colors.


Welcome to wellsr Q&A
wellsr Q&A is the VBA and Python programming community that rewards you for learning how to code.

Earn free prizes for asking VBA and Python questions and for answering questions asked by others in our community.

What makes us different?
Our points system rewards you with a chance for free gifts based on the quality of your questions and/or answers. Users that ask great questions, may be given complimentary gift cards or training material.

Getting Started

So, why don't you join us? It really is a neat way to reward the most dedicated members in our VBA and Python community.

For more programming tips visit the VBA Tutorials Blog and the Python Tutorials Blog.