Question

Visual Basic CheckedListBox help?

*Using Visual Basic 2010 Express incase it matters.

I have a checked list box which I want whatever checked on the list to show on a label. Anyone have any ideas? (Yes i'm new to this program). Any help is appreciated and thanks in advance.

Answer

use this code in any event, say button_click event

Label1.Text = ""

For i = 0 To CheckedListBox1.CheckedItems.Count - 1

Label1.Text = String.Concat(Label1.Text, vbCrLf, CheckedListBox1.CheckedItems(i))

Next

I have checked it on my computer. It shows list of all checked items in the label.

Please recheck it, it should work.

Jun 21 at 7:3

There is an excellent sample program listed at the bottom of this page http://msdn.microsoft.com/en-us/library/… that shows you how to gather data from a checked list box.

Jun 21 at 10:49