Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I put just for 3 of them.You can put 10 of course.
If Me.CheckBox1 Or Me.CheckBox2 Or Me.CheckBox3 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using Checkboxes | Excel Discussion (Misc queries) | |||
Checkboxes | Excel Discussion (Misc queries) | |||
Help with checkboxes | Excel Programming | |||
Checkboxes and Other | Excel Programming | |||
Checkboxes | Excel Programming |