Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing Checkbox Name
I was wondering how I could reference the name of a checkbox and assign it to
the value of a cell. To give an example of what I am looking for: I have 5 checkboxes on a sheet and the names of these checkboxes will eventually change. I would like call A1 to return the name of check box 1, cell A2 to return the name of check box 2, and so on. Any help would be greatly appreciated. Thanks! Chad |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing Checkbox Name
Try this...
Sub Do_Cool_Stuff() Dim CheckBoxes CheckBoxes = Array(CheckBox1.Name, CheckBox2.Name, _ CheckBox3.Name, CheckBox4.Name, CheckBox5.Name) Range("A1").Value = CheckBoxes(0) Range("A2").Value = CheckBoxes(1) Range("A3").Value = CheckBoxes(2) Range("A4").Value = CheckBoxes(3) Range("A5").Value = CheckBoxes(4) End Sub "Chad" wrote: I was wondering how I could reference the name of a checkbox and assign it to the value of a cell. To give an example of what I am looking for: I have 5 checkboxes on a sheet and the names of these checkboxes will eventually change. I would like call A1 to return the name of check box 1, cell A2 to return the name of check box 2, and so on. Any help would be greatly appreciated. Thanks! Chad |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Referencing Checkbox Names | Excel Worksheet Functions | |||
referencing a checkbox | Excel Programming | |||
link a checkbox in a sheet to a checkbox on a userform? | Excel Programming | |||
checkbox on form reset from checkbox on sheet | Excel Programming | |||
referencing a checkbox cell address in a worksheet | Excel Programming |