Specify colors with VBA's RGB function.
Sub rgbDemo()
range("A1").Interior.color = rgb(0, 0, 0) 'black
range("A2").Interior.color = rgb(255, 0, 0) ' pure red
range("A3").Interior.color = rgb(0, 0, 255) ' pure blue
range("A4").Interior.color = rgb(128, 128, 128) ' middle gray
End Sub
Related examples in the same category