I want to insert a new row in MS Excel using a VBA macro and also modify the background color (i.e. Interior.ColorIndex) of specific cells in the new row.
I am using ActiveCell.Offset(1).EntireRow.Insert
to insert a new row below the active cell, but I am unsure how to change the background color of specific cells in the new row.
For example:
If I inserted a new row (i.e. row 4) I would like to change the background color of cell B4
and C4
to be grey.
Any help would be most appreciated!
Regards
Martin