Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
caption of Triplestate buttons
I can change the caption of a ToggleButton with a simple
If ToggleButton1 = False Then ToggleButton1.Caption = "False" ElseIf ToggleButton1 = True Then ToggleButton1.Caption = "True" End If But if I enable Triplestate I can't get a different caption for "Null". The help file says that triplestate controls don't generate click events. So how can I get a new caption as well as just the greyed out "False" caption ? -- David M WinXP - Office2003 (Italian) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
caption of Triplestate buttons
With the Change Event:
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 Mike F "#DIV/0" wrote in message ... I can change the caption of a ToggleButton with a simple If ToggleButton1 = False Then ToggleButton1.Caption = "False" ElseIf ToggleButton1 = True Then ToggleButton1.Caption = "True" End If But if I enable Triplestate I can't get a different caption for "Null". The help file says that triplestate controls don't generate click events. So how can I get a new caption as well as just the greyed out "False" caption ? -- David M WinXP - Office2003 (Italian) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
caption of Triplestate buttons
Thanks Mike
-- David M WinXP - Office2003 (Italian) "Mike Fogleman" wrote: With the Change Event: 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 Mike F "#DIV/0" wrote in message ... I can change the caption of a ToggleButton with a simple If ToggleButton1 = False Then ToggleButton1.Caption = "False" ElseIf ToggleButton1 = True Then ToggleButton1.Caption = "True" End If But if I enable Triplestate I can't get a different caption for "Null". The help file says that triplestate controls don't generate click events. So how can I get a new caption as well as just the greyed out "False" caption ? -- David M WinXP - Office2003 (Italian) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Caption on command buttons shrinking | Excel Programming | |||
How to reference win.caption, when caption changes | Excel Programming | |||
Togglebutton with the triplestate turned to True | Excel Programming | |||
Changing caption text and hiding buttons | Excel Programming | |||
Sort buttons by caption? | Excel Programming |