M
Monte0682
I have 10 checkboxes on my worksheet. I wrote this code:
Public Function Check_box(i)
If Sheet1.CheckBox1.Value = True Then
Range("B3:G3").Interior.Color = RGB(135, 206, 235)
Range("G3").Value = "YES"
Range("G3").HorizontalAlignment = xlCenter
Else
Range("B3:G3").Interior.ColorIndex = xlNone
Range("G3").Value = ""
End If
End Function
How can I modify this so I can use it for all checkboxes... I know on
the forms you can use something:
controls("Checkbox"&i).value...etc where i is the checkbox number
Public Function Check_box(i)
If Sheet1.CheckBox1.Value = True Then
Range("B3:G3").Interior.Color = RGB(135, 206, 235)
Range("G3").Value = "YES"
Range("G3").HorizontalAlignment = xlCenter
Else
Range("B3:G3").Interior.ColorIndex = xlNone
Range("G3").Value = ""
End If
End Function
How can I modify this so I can use it for all checkboxes... I know on
the forms you can use something:
controls("Checkbox"&i).value...etc where i is the checkbox number