| | |
List Box help
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2008
Posts: 2
Reputation:
Solved Threads: 0
Hello, I need to know how to "extract" information out of list box.
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
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
•
•
Join Date: Oct 2008
Posts: 2
Reputation:
Solved Threads: 0
The for statement won't work coz I won't know how many items will be in the list box.
What I need to know is what code do I need to pull out the name of the item in the list box.
So if I had in a list box..
Gold - Running
Silver - Swimming
Gold - 100 meter
it would pull out all the names from the list box that starts with "G" and processes the name. Sorry if it isn't very clear
What I need to know is what code do I need to pull out the name of the item in the list box.
So if I had in a list box..
Gold - Running
Silver - Swimming
Gold - 100 meter
it would pull out all the names from the list box that starts with "G" and processes the name. Sorry if it isn't very clear
![]() |
Similar Threads
- Looking for List Box help, please! (VB.NET)
- getting data from a list box. (Visual Basic 4 / 5 / 6)
- [req]How to move elements in the list box up and down using command button? (Visual Basic 4 / 5 / 6)
- List Box as input field also (JavaScript / DHTML / AJAX)
- How do I populate multiple column list box? (Visual Basic 4 / 5 / 6)
- Drive List Box Help Please for Error 68 (Visual Basic 4 / 5 / 6)
- list box --php issue (PHP)
- My list box (Java)
- "Error in linking List box with the VB6.0 database" (Visual Basic 4 / 5 / 6)
Other Threads in the VB.NET Forum
- Previous Thread: Urgent Help !PLz help.....plzz
- Next Thread: Date and oledb
| Thread Tools | Search this Thread |
"crystal .net .net2008 2008 access add advanced application array assignment basic beginner box browser button buttons center click code combo convert cpu cuesent data database datagrid datagridview datetimepicker designer dissertation dissertations dissertationtopic dosconsolevb.net editvb.net employees excel exists firewall forms html images isnumericfuntioncall listview map math memory mobile module msaccess mssqlbackend mysql navigate net number opacity open pan pdf picturebox picturebox2 port position print printpreview record regex reuse right-to-left save search serial settings socket sorting sqldatbase sqlserver storedprocedure temp textbox timer timespan transparency txttoxmlconverter useraccounts usercontol vb vb.net vb.nettoolboxvisualbasic2008sidebar vba vbnet vista visual visualbasic visualbasic.net visualstudio.net web wpf wrapingcode xml year





