Monday 20 May 2013

How to set the background color of cell using Excel VBA Macro

In below example, I have changed the background color of the A1 using a Macro.

Code / Syntax : -

Range("A1").Interior.ColorIndex = 8   ' Change the background color  of Cell A1

Range("A1").EntireRow.Interior.ColorIndex = 8  'Change the background color of Entire Row.
This is how we can change the  background color of Cell/Range in Excel using VBA Macro

No comments:

Post a Comment

Popular Posts

Search This Blog