Checkboxes


Posted by Mary on December 03, 2001 8:06 AM

Is there anyway I can change the colour of the text or background for a check box if it is selected.

I use a worksheet to pre-select the value of a series of checkboxes on a userform. I want to highlight the current selections more forcefully than the simple tick

Thanks for any help given

Mary



Posted by Tom Dickinson on December 03, 2001 9:42 AM

Try this:

Private Sub CheckBox1_Click()
If CheckBox1 Then
CheckBox1.BackColor = &H80FF&
Else
CheckBox1.BackColor = &HFFFFFF
End If
End Sub

The first turns it to rust, the else changes it to white. For other color selections, find the color you want in the background properties, and copy it to the macro.