Hello,
I make a little userform for a colortest.
It work with a Commandbutton (controle).
Is there any possibility to work without that button?
Thanks in advance,
NonkeLuc.
Private Sub Controle_Click()
If CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True Then
UserForm1.TextBox1.BackColor = RGB(165, 42, 42) ' brown
ElseIf CheckBox1.Value = True And CheckBox2.Value = True Then
UserForm1.TextBox1.BackColor = RGB(255, 128, 0) ' orange
ElseIf CheckBox1.Value = True And CheckBox3.Value = True Then
UserForm1.TextBox1.BackColor = RGB(238, 130, 238) ' violet
ElseIf CheckBox2.Value = True And CheckBox3.Value = True Then
UserForm1.TextBox1.BackColor = RGB(0, 128, 0) ' green
ElseIf CheckBox1.Value = True Then
UserForm1.TextBox1.BackColor = RGB(255, 0, 0) ' red
ElseIf CheckBox2.Value = True Then
UserForm1.TextBox1.BackColor = RGB(255, 255, 0) ' yellow
ElseIf CheckBox3.Value = True Then
UserForm1.TextBox1.BackColor = RGB(0, 0, 255) ' blue
Else: UserForm1.TextBox1.BackColor = RGB(255, 255, 255) ' white
End If
End Sub
Bookmarks