A ToggleButton named ToggleButton2.
Private Sub UserForm_Initialize()
CheckBox1.Caption = "Value is True"
CheckBox1.Value = True
CheckBox1.TripleState = False
ToggleButton1.Caption = "Value is True"
ToggleButton1.Value = True
ToggleButton1.TripleState = False
ToggleButton2.Value = False
ToggleButton2.Caption = "Triple State Off"
End Sub
Private Sub ToggleButton2_Click()
If ToggleButton2.Value = True Then
ToggleButton2.Caption = "Triple State On"
CheckBox1.TripleState = True
ToggleButton1.TripleState = True
Else
ToggleButton2.Caption = "Triple State Off"
CheckBox1.TripleState = False
ToggleButton1.TripleState = False
End If
End Sub
Private Sub CheckBox1_Change()
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
Private Sub ToggleButton1_Change()
If IsNull(ToggleButton1.Value) Then
ToggleButton1.Caption = "Value is Null"
ElseIf ToggleButton1.Value = False Then
ToggleButton1.Caption = "Value is False"
ElseIf ToggleButton1.Value = True Then
ToggleButton1.Caption = "Value is True"
End If
End Sub