Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Feb 2001
    Thanked 0 Times in 0 Posts

    Clicking Multiple Command Buttons

    Hi All

    In Excel I have created a sheet that has numerous Command Buttons called cb_1 to cb 59 on it. I have 2 command buttons that Click buttons 1-29 (set1) and 30-59(set2). Using VBA I have listed cb1_click,cb2_click etc which works but I am looking for a simpler neater way to achieve the same effect of progmatically clicking the buttons. I need the option of clicking set 1 or set 2
    Thanks for any help

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Hollywood (sorta), California, USA
    Thanked 0 Times in 0 Posts

    Re: Clicking Multiple Command Buttons


    1) Get the value of chkSet1 or chkSet2
    2) loop through the controls on the form. If chkSet1 AND (val(mid$(,4,2)) > 0 OR val(mid$(,4,2)) < 60) then control.value = true. That should check all cb_1 thru cb_59 boxes.
    Kevin <IMG SRC= alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts