How to hande events to control arrays?

Discussion in 'Microsoft VB .NET' started by SuperRider, Apr 1, 2004.

  1. SuperRider

    SuperRider Guest

    I have ~ 50 comboboxes (in an array) on a form, and I want to run the same
    subroutine every time any combobox changes. Now, I can get this done by
    manually editing the "OnChanged" for every one, but surely there is an
    easier (shorter) way to do it.

    TIA!
     
    SuperRider, Apr 1, 2004
    #1
    1. Advertisements

  2. SuperRider

    Marina Guest

    Have their onchanged event all go to the same handler. Loop through your
    array, adding the handler for each combobox.

    "SuperRider" <> wrote in message
    news:c4i4l4$fqq$...
    > I have ~ 50 comboboxes (in an array) on a form, and I want to run the same
    > subroutine every time any combobox changes. Now, I can get this done by
    > manually editing the "OnChanged" for every one, but surely there is an
    > easier (shorter) way to do it.
    >
    > TIA!
    >
    >
     
    Marina, Apr 1, 2004
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Armin Zingler

    Re: Control Arrays

    Armin Zingler, Jul 22, 2003, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    497
    Mr. B
    Jul 22, 2003
  2. Scott McChesney

    Translating child events into parent-control events

    Scott McChesney, May 7, 2004, in forum: Microsoft VB .NET
    Replies:
    0
    Views:
    529
    Scott McChesney
    May 7, 2004
  3. Rethish R
    Replies:
    1
    Views:
    379
    Ken Tucker [MVP]
    Nov 25, 2004
  4. Luqman
    Replies:
    1
    Views:
    246
    gene kelley
    Jun 30, 2006
  5. Mike
    Replies:
    0
    Views:
    158
Loading...

Share This Page