View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default generic checkbox click form event handler?

Each check box must have a unique function. But all of the routines can have
one instruction which call a common function.

"fedude" wrote:

I have a large form with 28 checkboxes on it. The checkboxes are named Qxxxx
where xxxx is a meaningful number that links me to the proper text box also
on the form. (textboxes are named Sxxxx). xxxx is a unique identifier and
not sequential.

I want to disable/enable the appropriate textbox if the corresponding
checkbox is clicked.

I'd prefer to not have to write 28 Qxxxx_Click routines with the exact same
code in all of them. Is there some way to create a generic checkbox_Click
event that can be handled by one routine? Or is there some way to write one
routine and have it handle all the checkbox_Click events?