Excel VBA, Color Code
This article provides a sample on using the color code in VBA for Excel. In this example the user inputs a color code in cell B1. The fill color in cell A1 is changed to the color defined by the color code in cell B1. The program uses a Worksheet_Change event handler. The event handler executes whenever the user changes the value in cell B1:
'executes when the user changes the value in cell B1
Private Sub worksheet_change(ByVal target As Range)
'changes the color in cell A1
Range("A1").Interior.Color = Cells(1, 2)
End Sub
Color Code 12:
You can download the file and code related to this article here.
See also:
- Excel VBA, Get Color Code
- Excel VBA, RGB
- Excel VBA, Getting the Color Code Using the Macro Recorder
- Excel VBA, ColorConstants
- Excel VBA, XlRgbColor
- VBA Excel, Colors
- Excel VBA, Color Dialog xlDialogEditColor
If you need assistance with your code, or you are looking for a VBA programmer to hire feel free to contact me. Also please visit my website www.software-solutions-online.com