+ Reply to Thread
Results 1 to 2 of 2

Use Variable In CheckBox Name

  1. #1
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Use Variable In CheckBox Name

    I have 12 Checkboxes on a form named cb1 to cb12.

    From within a for loop I need to test 1 to 12 step 1

    For i = 1 to 12 step 1
    how do I test checkbox value for cb & i
    e.g. if i = 1, I need value cb1
    if i = 7, I need to value of cb7
    next 1

    thanks in advance

  2. #2
    Dave Peterson
    Guest

    Re: Use Variable In CheckBox Name

    dim iCtr as long
    for ictr = 1 to 12
    msgbox me.controls("CB" & ictr).value
    next ictr



    mudraker wrote:
    >
    > I have 12 Checkboxes on a form named cb1 to cb12.
    >
    > From within a for loop I need to test 1 to 12 step 1
    >
    > For i = 1 to 12 step 1
    > how do I test checkbox value for cb & i
    > e.g. if i = 1, I need value cb1
    > if i = 7, I need to value of cb7
    > next 1
    >
    > thanks in advance
    >
    > --
    > mudraker
    > ------------------------------------------------------------------------
    > mudraker's Profile: http://www.excelforum.com/member.php...fo&userid=2473
    > View this thread: http://www.excelforum.com/showthread...hreadid=528973


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1