there's 2 types of checkboxes that can be inserted in a worksheet.
The first is inserted from Control Toolbox Tool (embedded CB)
The second one is inserted from Forms Toolbar (native CB)
The embedded (msforms.checkbox.1) control has many more properties and
settings than the native checkbox.
And coding it is easy: (in the sheet's code module..)
Private Sub CheckBox1_Change()
With Me.CheckBox1
.BackColor = IIf(.Value, vbWhite, vbRed)
End With
End Sub
BUT i'm not a fan of using (a lot of) embedded controls on a worksheet.
Clean your temp directory.
Open a file with 50 or so checkboxes
Now check your temp directory and you'll see why.
So let's see what we can do with a NATIVE checkbox...
You could assign a macro to it... when clicked runs and changes color.
use the application.caller to get the name..
and you'll need one macro only..
(again put this in the SHEET's code module)
Sub CheckBox_ChangeNative()
With Me.Shapes(Application.Caller).Fill.ForeColor
.SchemeColor = IIf(.SchemeColor = 10, 9, 10)
End With
End Sub
I'd go for the second approach..
keepITcool
< email : keepitcool chello nl (with @ and .)
< homepage:
http://members.chello.nl/keepitcool
"Hank Hendrix" wrote:
Is there a way to have a check box stand out by changing color, bold
type, or another way when it is checked.
I have many check boxes on a worksheet. I would like some of them to
"stand out" if selected.
Thanks
Hank