Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My userform contains about 547 check boxes representing
the weeks during a project. The user is supposed to check or to uncheck the checkboxes conform his/her desire. Based on each checkbox change a certain number of calculations will have to be performed. I am looking for a method to combine the change of one of the checkboxes into one procedure (i.s.o. 547 subs). Ofcourse within the sub it should be possible to know which checkbox initiated this event, in order to perform the right calculations. Any help would be appreciated. Harald Witmer |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What kind of checkbox. The method would be entirely different for checkboxes
from the Control Toolbox Toolbar and those from the Forms Toolbar (the latter would be much simpler). Also are the checkboxes on a worksheet - I would assume so. For control toolbox toolbar, look at the method John Walkenbach documents: http://j-walk.com/ss/excel/tips/tip44.htm Handle Multiple UserForm Buttons With One Subroutine this can be adapted for the checkbox click event. for those from the forms toolbar, you assign all checkboxes to the same macro. In the macro, you can determine the checkbox firing the macro with application.Caller Sub Chkbox_click() Dim chkbx as Checkbox set chkbx = Worksheets("Sheet1").Checkboxes(Application.Caller ) msgbox chkbx.Caption " was clicked" End Sub as a simple example. -- Regards, Tom Ogilvy "Harald Witmer" wrote in message ... My userform contains about 547 check boxes representing the weeks during a project. The user is supposed to check or to uncheck the checkboxes conform his/her desire. Based on each checkbox change a certain number of calculations will have to be performed. I am looking for a method to combine the change of one of the checkboxes into one procedure (i.s.o. 547 subs). Ofcourse within the sub it should be possible to know which checkbox initiated this event, in order to perform the right calculations. Any help would be appreciated. Harald Witmer |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple checkboxes and aligning | Excel Discussion (Misc queries) | |||
Multiple Checkboxes | Excel Discussion (Misc queries) | |||
Adding multiple checkboxes | Excel Discussion (Misc queries) | |||
Multiple Checkboxes Shortcut? | Excel Discussion (Misc queries) | |||
How to code event for dynamically generated checkboxes | Excel Programming |