Results 1 to 3 of 3

Thread: Listbox ItemCheck

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    116

    Exclamation

    I would like to know how to, for example, set:
    X=1 when an item is 'checked' in a listbox
    X=0 when an item is 'unchecked' in a listbox

    Your help is appreciated. Thank you.

    0101011001000010
    01101111011011100110110001101001011011100110010101110010

  2. #2
    Hyperactive Member Asaf_99's Avatar
    Join Date
    Jul 2000
    Location
    Israel
    Posts
    335


    To know if it's Unchecked:
    <code>
    If List1.ListIndex <> -1 Then
    List1.Selected(List1.ListIndex) = True
    End If
    </code>

    To know if it's Checked:
    <code>
    If lstItems.ListIndex <> -1 Then
    lstItems.Selected(lstItems.ListIndex) = False
    End If
    </code>

    Hope this helps!
    Asaf Sagi

    ICQ: 61917199
    E-Mail: [email protected]

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    116

    Wink

    Yes, your code was very helpful.
    Thank Asaf_99.
    0101011001000010
    01101111011011100110110001101001011011100110010101110010

Posting Permissions

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



Click Here to Expand Forum to Full Width