Results 1 to 2 of 2

Thread: Please ammend this checklist code

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2001
    Posts
    52

    Please ammend this checklist code

    Hi,

    in the following code I want to let ALL the items of checkedlist1 been checked

    Dim i As Integer

    i = Me.CheckedListBox1.Items.Count()

    For i = 0 To i - 1
    Me.CheckedListBox1.GetItemChecked(i) = True
    Next

    but it gives me error
    Please ammend this code to make ALL the items of checkedlist1 been checked

    thanx

  2. #2
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi Mina.

    This should work.

    VB Code:
    1. Dim I As Integer
    2.  
    3. For I = 0 To CheckedListBox1.Items.Count - 1
    4.     CheckedListBox1.SetItemChecked(I, True)
    5. Next
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

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