Hi all
I am developing an excel tool which will have as many as 50 checkboxes that will trigger a macro to create a chart and position it just below the checkbox. That macro is all written and works, but I am currently having to assign a different Macro to each checkbox to call the create_chart(row) macro, passing it a reference to the cell to which the activated checkbox is linked. The passing of that reference is the only reason the individual macros are needed. I'd like to avoid the file bloat associated with having a small calling routine assigned to each checkbox. I think I can do this if I can get the create_chart macro to recognize which checkbox was last acivated. My question is this. Is there a property/method (e.g. ActiveCheckbox) in VBA that will do this? If not, is there a property within the checkbox collection (e.g. Checkboxes(x).Link) that references the linked cell. That way I could use a for loop to find the activated checkbox.
Any help would be appreciated.
Thanks.
I am developing an excel tool which will have as many as 50 checkboxes that will trigger a macro to create a chart and position it just below the checkbox. That macro is all written and works, but I am currently having to assign a different Macro to each checkbox to call the create_chart(row) macro, passing it a reference to the cell to which the activated checkbox is linked. The passing of that reference is the only reason the individual macros are needed. I'd like to avoid the file bloat associated with having a small calling routine assigned to each checkbox. I think I can do this if I can get the create_chart macro to recognize which checkbox was last acivated. My question is this. Is there a property/method (e.g. ActiveCheckbox) in VBA that will do this? If not, is there a property within the checkbox collection (e.g. Checkboxes(x).Link) that references the linked cell. That way I could use a for loop to find the activated checkbox.
Any help would be appreciated.
Thanks.