Thread: Checkbox
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Edwin Tam (MS MVP) Edwin Tam (MS MVP) is offline
external usenet poster
 
Posts: 48
Default Checkbox

So, create the following macro in a module, then assign it to the checkbox on your worksheet.

Sub CheckBox1_Click()
With ActiveSheet.CheckBoxes("Check Box 1")
If .Value = xlOn Then
Range("A1").Interior.ColorIndex = 6
Else
Range("A1").Interior.ColorIndex = xlNone
End If
End With
End Sub

----- cadbury wrote: -----


The Checkbox is in a worksheet.