Excel Vba Change Cell's Background ColorThe userform starts as automatically when the worksheet is opened .Background color of selected cells can be changed with scrollbar control on this userform.
The scrollbar's min value is 0, the maximum value is 56.
"Private Sub CommandButton1_Click()
Private Sub ScrollBar1_Change()
TextBox1.Value = ScrollBar1.Value
Selection.Interior.ColorIndex = ScrollBar1.Value
Private Sub UserForm_Initialize()
ScrollBar1.Min = 0
ScrollBar1.Max = 56