shannondbaker
Board Regular
- Joined
- Sep 25, 2003
- Messages
- 121
Good Afternoon Board,
I want visual basic to assign an exact color to a cell but I don't know how to select more than the default colors allowed. I ultimately need to give it the command for RGB (red, green, blue) and possibly HSL (hue, saturation, luminance). Below, you will find code for a cell and a textbox. I want to be able to have as much control as the textbox code for the cell. I'm sure this is a minor overlook on my part, but your help would be appreciated.
Thanks in advanced,
Shannon
SAMPLE CODE (Textbox):
ActiveSheet.Shapes("Text Box 16").Select
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(51, 153, 255)
SAMPLE CODE(Cell):
With Selection.Interior
.ColorIndex = 30
End With
I want visual basic to assign an exact color to a cell but I don't know how to select more than the default colors allowed. I ultimately need to give it the command for RGB (red, green, blue) and possibly HSL (hue, saturation, luminance). Below, you will find code for a cell and a textbox. I want to be able to have as much control as the textbox code for the cell. I'm sure this is a minor overlook on my part, but your help would be appreciated.
Thanks in advanced,
Shannon
SAMPLE CODE (Textbox):
ActiveSheet.Shapes("Text Box 16").Select
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(51, 153, 255)
SAMPLE CODE(Cell):
With Selection.Interior
.ColorIndex = 30
End With