LA Lawyer said:
I need to know the value of the first (OR ONLY) listed item (the value of
the
first column) in a List Box.
"The first column", or the first row? From what you said, I'm guessing that
you mean the first row.
My ListBox is named ListOfPeople.
Here's example code:
Dim varFirstValue As Variant
With MeMe.ListOfPeople
If .ListCount > Abs(.ColumnHeads) Then
varFirstValue = .ItemData(Abs(.ColumnHeads))
Else
' The list box is empty.
varFirstValue = Null
End If
End With
I'm assuming that you want the value of the list box's bound column, for the
first non-header row. It is possible to get other columns using the .Column
property.