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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading Selected Data From ListBox Control 1

Status
Not open for further replies.

GGleason

Technical User
Mar 22, 2001
321
US
Does anyone know how to read the selected data from a ListBox control (Microsoft 2.0 ListBox)?

Here is the code (error is in red):
[tt]
If lstPostProcErrLog.ListCount > 0 Then
For i = 0 To lstPostProcErrLog.ListCount - 1
If lstPostProcErrLog.Selected(i) Then
[tt]strErrLog = lstPostProcErrLog.ItemData(i)[tt]
MsgBox strErrLog
End If
Next i
End If
[/color] [/color] [/tt]
tia,
GGleason
 
Hi!

You can use the column property:

strErrLog = lstPostProcErrLog.Column(0, i)

will access the data in the first column.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top