'define a class containing the document info Public Class CDocument Public ID As Long Public FileName As String Public DocType As String Public Sub New(ByVal idf As Long, ByVal FN As String,_ ByVal DT As String) ID = idf FileName = FN DocType = DT End Sub Public Overrides Function ToString() As String Return FileName + " (" + DocType + ")" End Function End Class Public Sub FillDocumentList(ByVal IDMask As Integer) Dim i As Integer listDoc.Items.Clear() For i = 1 To 20 listDoc.Items.Add(New CDocument(i.ToString(), _ "File " + i.ToString() + ".txt", "txt") Next End Sub Private Sub listDoc_SelectedIndexChanged(ByVal sender _ As System.Object, ByVal e As System.EventArgs) _ Handles listDoc.SelectedIndexChanged Dim d As CDocument d = listDoc.SelectedItem MessageBox.Show("Document ID : " + d.ID.ToString() + vbCrLf +_ "Document name : " + d.FileName + vbCrLf +_ "Doc Type : " + d.DocType + vbCrLf) End Sub