Hi all, have a checkbox and need to test for its 3 states. true, false and null.
true and false are working fine, null just wil not work. any suggestions.
simple userform with a single checkbox and the following code attached to it for testing.
true and false are working fine, null just wil not work. any suggestions.
simple userform with a single checkbox and the following code attached to it for testing.
Code:
Private Sub CheckBox1_Click()
If IsNull(CheckBox1.Value) Then
CheckBox1.Caption = "Value is Null"
ElseIf CheckBox1.Value = False Then
CheckBox1.Caption = "Value is False"
ElseIf CheckBox1.Value = True Then
CheckBox1.Caption = "Value is True"
End If
End Sub