MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Tick box question


Posted by Brad on January 31, 2002 1:22 PM

I have a tick box in my system and it is linked to a cell. The default text for the box being ticked is "True"-how can I change this to say "Yes" instead? Similarly, the unchecked box displays "False" in the linked cell-how do I change this to "No"?
Thanks in advance for any help
Brad


Posted by Bariloche on January 31, 2002 7:21 PM

Brad,

One solution would be to use the checkbox from the Control toolbox instead of the one from the Forms toolbox. Using the Control checkbox allows you to put code into the checkbox event procedure. You could use the following code (modified as necessary for your situation) to get the result you desire.

Private Sub CheckBox1_Click()

If CheckBox1 Then
Range("I6").Value = "Yes"
Else
Range("I6").Value = "No"
End If

End Sub


enjoy