rian@ccld.us
New member
i need to convert items in my checkedlistbox to a string simmilar to item1,item2,item3 etc for use in a mysql command "select item1,item2,item3 from datatable" currently i have this code to move the column list i have gathered and placed into my first checkedlistbox to the second checkedlistbox but i need that way to export.
Private Sub AddButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddButton.Click
' Display in a message box all the items that are checked.
Dim indexChecked As Object
Dim itemChecked As Object
Dim itemTransfered As Object
' Next show the object title and check state for each item selected.
For Each itemChecked In CheckedListBox1.CheckedItems
CheckedListBox2.Items.Add(itemChecked.ToString)
'MessageBox.Show("" + itemChecked.ToString + ",")
Next
MessageBox.Show(CheckedListBox2.Items.Count)
For Each itemTransfered In CheckedListBox2.Items
CheckedListBox1.Items.Remove(itemTransfered)
Next
End Sub
Private Sub AddButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddButton.Click
' Display in a message box all the items that are checked.
Dim indexChecked As Object
Dim itemChecked As Object
Dim itemTransfered As Object
' Next show the object title and check state for each item selected.
For Each itemChecked In CheckedListBox1.CheckedItems
CheckedListBox2.Items.Add(itemChecked.ToString)
'MessageBox.Show("" + itemChecked.ToString + ",")
Next
MessageBox.Show(CheckedListBox2.Items.Count)
For Each itemTransfered In CheckedListBox2.Items
CheckedListBox1.Items.Remove(itemTransfered)
Next
End Sub