Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Change event for multiple checkboxes

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Change event for multiple checkboxes

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
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
Multiple checkboxes and aligning Dudedad Excel Discussion (Misc queries) 2 June 26th 07 07:28 PM
Multiple Checkboxes Annie Excel Discussion (Misc queries) 2 June 11th 07 05:06 PM
Adding multiple checkboxes timmeah4 Excel Discussion (Misc queries) 7 December 6th 06 02:48 PM
Multiple Checkboxes Shortcut? Jason Excel Discussion (Misc queries) 1 October 18th 05 08:08 PM
How to code event for dynamically generated checkboxes Chong Moua Excel Programming 0 July 9th 03 08:18 PM


All times are GMT +1. The time now is 07:21 AM.

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

About Us

"It's about Microsoft Excel"