View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Set background color of a cell in VBA


-----Original Message-----
Anyone know how to change the background color of a cell
in Excel 2000 VBA code? Thank you

Cindy
.

You need to use the Interior property of the Range object:
Range("A1").Interior.Color = ColorValue

ColorValue is a number specifying the color, or you can
use the RGB function RGB(RedValue,GreenValue,BlueValue)
where RedValue,GreenValue, and BlueValue are 0-255. For
example, yellow is pure red and pure green mixed together
or RGB(255,255,0).