Tag Archives: Color

No Thumbnail

Excel VBA, Column Gradient Color

In the article Excel VBA, Gradient’s Colors I’ve explained the basics about working with gradient’s color. I’m assuming the reader is familiar with the topics covered in that article. – Gradient Color, Column: In the article Excel VBA, Gradient’s Colors I provided 2 examples for creating gradients with different colors. The examples

No Thumbnail

Excel VBA Remove Sheet Fill Color

The following line of code removes any fill color applied to the cells in sheet 2: Sheet2.Cells.Interior.Color = xlNone Before: After: See also: Excel VBA, Cell Fill Color Excel VBA, Formatting Cells and Ranges using the Macro Recorder If you need assistance with your code, or you

No Thumbnail

Excel VBA Remove Row Fill Color

The following line of code removes the fill color of the first row: Rows(1).Interior.Color = xlNone  Before: After: See also: Excel VBA, Cell Fill Color Excel VBA, Formatting Cells and Ranges using the Macro Recorder If you need assistance with your code, or you are looking

No Thumbnail

Excel VBA, Range Fill Color

The following lines all changes the fill color of the range “A1:B1” to blue: Range(“A1:B2”).Interior.Color = vbBlue Same as the previous line but using a different notation: Range(Cells(1, 1), Cells(2, 2)).Interior.Color = vbBlue Same as the previous lines but instead of using the blue color constant

No Thumbnail

Excel VBA Remove Cell Fill Color

The following line of code removes the fill color of the cell A1: Range(“A1”).Interior.Color = xlNone The following line of code does the same: Range(Cells(1, 1), Cells(1, 1)).Interior.Color = xlNone Before: After: See also: Excel VBA, Cell Fill Color Excel VBA, Formatting Cells and Ranges

No Thumbnail

Excel VBA, Column Fill Color

The following line changes the fill color of the first column to blue: Columns(1).Interior.Color = vbBlue Same as the previous line but instead of using the blue color constant it uses the blue color code Columns(1).Interior.Color = 16711680 For more information about working with colors in

No Thumbnail

Excel VBA, Gradient’s Colors

This article explains how you can change a gradient’s first and second color using VBA for Excel. It also provides a sample for getting the current gradient color used in a cell. Note the codes in this article assume a gradient already exists and we are

No Thumbnail

Excel VBA, Font Color

In this article I will explain how you can change the font color of cells and ranges in Excel using VBA. I’ve also provided an example on how you can get the current font color used in a cell. For more information about working with

No Thumbnail

Excel VBA, Color Code

This article provides a sample on using the color code in VBA for Excel. In this example the user inputs a color code in cell B1. The fill color in cell A1 is changed to the color defined by the color code in cell B1.