Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ListBox Question

Status
Not open for further replies.

darude

Programmer
Jun 23, 2003
138
0
0
US
Good Afternoon,
I have a listbox that contains the string
'Q1. AnswerID 24(0-20%) Unlocks Q2a.' When I use the following code I get the full string. I need to get the Values 24 and Q2a from the string to determine if this is the row the user wants to delete. Thank you in advance for any insight.

If Me.lstSkipLogic.SelectedItems.Count <> 0 Then
' If so, loop through all checked items and print results.
Dim x As Integer
Dim s As String = ""
For x = 0 To lstSkipLogic.SelectedItems.Count - 1
s = s & "Checked Item " & CStr(x + 1) & " = " & _
CStr(Me.lstSkipLogic.SelectedItems(x)) & ControlChars.CrLf
Next x
MessageBox.Show(s)
End If
 

How are you populating the listbox in the first place?


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
I'm actually populating a detached datarow of the actual data. The purpose of the listbox is to show the user what they are doing in english rather than displaying data fields that won't make any sense. So,the listbox is getting populated by a string build from the datarow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top