Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checkbox Macros
I am making a Risk Management spreadsheet for my work.
My macros are two columns of roughly 100 checkboxes, and a print macro. Each checkbox is to update a hidden column (with either a 1 or 0), and the print macro hides any row with a 0 in the hidden column before printing. This way only the relevant rows get printed. I have tried two approaches to this, and had problems with each. When I use the checkbox from the Forms toolbar, I can't move and size it with the rows, so if a user re-sizes the row, the checkboxes are no longer aligned with the rows. When I use the checkbox from the Control Toolbox, I have to go through each checkbox (over 200) and write a unique line of code to run. Copying and pasting these checkboxes does not transfer the code. Does anybody have any good ideas on how to solve my problem? Thanks much. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checkbox Macros
Use control toolbox checkboxes and use John Walkenbach's technique to handle
them with a single macro: http://j-walk.com/ss/excel/tips/tip44.htm Handle Multiple UserForm Buttons With One Subroutine His example uses commandbuttons, but can be easily adapted to checkboxes and the click or change event. -- Regards, Tom Ogilvy Joe Strommen wrote in message ... I am making a Risk Management spreadsheet for my work. My macros are two columns of roughly 100 checkboxes, and a print macro. Each checkbox is to update a hidden column (with either a 1 or 0), and the print macro hides any row with a 0 in the hidden column before printing. This way only the relevant rows get printed. I have tried two approaches to this, and had problems with each. When I use the checkbox from the Forms toolbar, I can't move and size it with the rows, so if a user re-sizes the row, the checkboxes are no longer aligned with the rows. When I use the checkbox from the Control Toolbox, I have to go through each checkbox (over 200) and write a unique line of code to run. Copying and pasting these checkboxes does not transfer the code. Does anybody have any good ideas on how to solve my problem? Thanks much. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Checkbox macros | Excel Discussion (Misc queries) | |||
How to have Checkbox A uncheck with checked Checkbox B | Excel Discussion (Misc queries) | |||
checkbox that controls macros??? | Setting up and Configuration of Excel | |||
checkbox and macros | Excel Worksheet Functions | |||
Suppress the Disable Macros / Enable Macros Dialog | Excel Programming |