Private Sub ScrollBar1_Change()
Call SetColors
End Sub
Sub SetColors()
Dim strA As String, strB As String, strC As String, str As String
Dim varColor As Variant
str = "00"
strA = Hex(ScrollBar1.Value)
strA = strA & String(2 - Len(strA), "0")
strB = Hex(ScrollBar2.Value)
strB = strB & String(2 - Len(strB), "0")
strC = Hex(ScrollBar3.Value)
strC = strC & String(2 - Len(strC), "0")
varColor = str & strA & strB & strC
Label2.Caption = ScrollBar1.Value
Label3.Caption = ScrollBar2.Value
Label4.Caption = ScrollBar3.Value
Label1.BackColor = hex2dec(varColor)
End Sub