Hello, I need to know how to "extract" information out of list box.
Dim intLoop As Integer Dim blnStartG As Boolean Dim intCounter As Integer Dim strMedal As String Dim intcheck As Integer For intLoop = 0 To (lstResults.Items.Count = -1) blnStartG = False strMedal = lstResults.????????? blnStartG = strMedal.StartsWith("G") If blnStartG = True Then intCounter = intCounter + 1 End If intcheck = intcheck + 1 Next MessageBox.Show("Total amount of gold medals are: " & intCounter & " " & intcheck, "Amount", MessageBoxButtons.OK, MessageBoxIcon.Information)
What I am trying to do is count all the items that start with "G". I'm sure the method I'm trying to use is correct but I need to know how to get the name of the item from the List box to the varible "StrMedal".
Many thanks, Anthony
P.s I know know its a strange program, its for college ;)