Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checkbox macros LN[_2_] Excel Discussion (Misc queries) 2 January 6th 09 06:13 AM
How to have Checkbox A uncheck with checked Checkbox B Texas Aggie Excel Discussion (Misc queries) 3 July 20th 07 10:58 PM
checkbox that controls macros??? childofthe1980s Setting up and Configuration of Excel 0 March 6th 07 12:40 PM
checkbox and macros Tdebb8594 Excel Worksheet Functions 1 January 14th 05 10:00 PM
Suppress the Disable Macros / Enable Macros Dialog Shoji Karai Excel Programming 5 September 24th 03 03:10 AM


All times are GMT +1. The time now is 06:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"