Wednesday, July 8, 2009

How to display combobox item or Join all combobox item with comma separate in single variable
With combobox1.Items
.Add("T1")
.Add("T2")
.Add("T3")
.Add("T4")
.Add("T5")
End With
Dim str As String
str = ""
For Each obj As Object In combobox1.Items
MsgBox(obj(0).ToString)
str = str & obj(0) & ","
Next
str = Mid(str, 1, str.Length - 1)

No comments: