chaosisbliss
New Member
- Joined
- May 14, 2011
- Messages
- 7
I have the following checkbox Macro which works great. I have checkboxes from E3 to E45. What I would like to accomplish is when any checkbox value is True that it changes the color of the Row it's checked. For example, if E3 was checked, it would change A3:D3 to orange.
Thanks in advance.
Sub AddCheckBox()
Dim cell As Range
'DelCheckBox 'Do the delete macro
'or delete all checkboxes in the worksheet
' ActiveSheet.CheckBoxes.Delete
For Each cell In Range("E3:E45")
With ActiveSheet.CheckBoxes.Add(cell.Left, _
cell.Top, cell.Width, cell.Height)
.LinkedCell = cell.Offset(, 0).Address(External:=True)
.Interior.ColorIndex = 12 'or xlNone or xlAutomatic
.Caption = ""
.Border.Weight = xlThin
End With
Next
With Range("E3:E45")
.Rows.RowHeight = 15
End With
End Sub
Sub DelCheckBox()
For Each cell In Range("E3:E45")
Worksheets("Count").CheckBoxes.Delete
Next
End Sub
Thanks in advance.
Sub AddCheckBox()
Dim cell As Range
'DelCheckBox 'Do the delete macro
'or delete all checkboxes in the worksheet
' ActiveSheet.CheckBoxes.Delete
For Each cell In Range("E3:E45")
With ActiveSheet.CheckBoxes.Add(cell.Left, _
cell.Top, cell.Width, cell.Height)
.LinkedCell = cell.Offset(, 0).Address(External:=True)
.Interior.ColorIndex = 12 'or xlNone or xlAutomatic
.Caption = ""
.Border.Weight = xlThin
End With
Next
With Range("E3:E45")
.Rows.RowHeight = 15
End With
End Sub
Sub DelCheckBox()
For Each cell In Range("E3:E45")
Worksheets("Count").CheckBoxes.Delete
Next
End Sub