Try this :
Paste this code into the Sheet level module ...
OOption Explicit
Sub ColorRng()
'Then change the background to the specified color
Selection.Interior.Color = RGB(255, 255, 204)
With Selection
.Borders(xlEdgeLeft).LineStyle = xlContinuous
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlContinuous
.Borders(xlEdgeBottom).LineStyle = xlContinuous
End With
End Sub
Sub ClearColor()
'Then clear the background color
Selection.Interior.ColorIndex = xlNone
With Selection
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
End With
End Sub
The method of click / drag a range to change colors is cumbersome. Use of the command buttons is a sure thing.
Bookmarks