PDA

View Full Version : Checkbox to write values to multiple cells



DoesNotKnow
03-21-2018, 11:01 AM
Hi

I need some help with the following.
I have a checkbox when checked reveals hidden rows.

Now I would like when the same checkbox is checked that it would also populate multiple cells in a single column with various numbers. and when it is unselected the cells go back to value of 0.

Ex. Checked, Cell E2 = 4, E3 = 1, E4 = 2, etc etc.
Ex. Unchecked, all previous cells = 0

Thank you,

SamT
03-21-2018, 12:14 PM
We need to know if it is a "Forms" CheckBox, or a "Control ToolBox" CheckBox. All we can surmise right now is that it is not a VBA Userform CheckBox, all three are treated differently.

IMHO, the "Forms" Controls are the most difficult to work with.

Paul_Hossler
03-21-2018, 12:50 PM
Hi

I need some help with the following.
I have a checkbox when checked reveals hidden rows.

Now I would like when the same checkbox is checked that it would also populate multiple cells in a single column with various numbers. and when it is unselected the cells go back to value of 0.

Ex. Checked, Cell E2 = 4, E3 = 1, E4 = 2, etc etc.
Ex. Unchecked, all previous cells = 0

Thank you,

Please show the code

Use the [#] icon to insert
.... tags and paste the macro between then

DoesNotKnow
03-21-2018, 12:50 PM
It is an ActiveX control Checkbox

SamT
03-21-2018, 02:27 PM
Gee, I'm really stupid :confused: ...Is that a Forms control or a Control Toolbox control.

Paul_Hossler
03-21-2018, 03:08 PM
Things have changed since 2003 :rofl:

You can put an ActiveX control on a sheet ...

21882


... and it has it's own event handler in the worksheet's code page

21883

SamT
03-21-2018, 03:58 PM
Things have changed since 2003Not Really. Only the name has changed, because the Menu Bar was scrapped for the Ribbon by the Jeune École at MS. They were simply Control Toolbox Controls. But thanks for answering my question, but I already knew the answer. I just HATE IT :banghead: when new poster doesn't answer our questions.