in

Return listbox row index based on search criteria

Hi All,

I can't seem to find a simple solution to this one.

I have a list box with 5 columns that displays a small amount of customer information.

Behind the form contiaining the listbox I have some code that returns a customer number (from other things the user can do not related to the listbox)

What I want to do then is highlight the row of the listbox where the column containing the customer number matches.  The column containing the customer number is Column(3)

If I can just find a way to return the list index.

Any help would be appreciated.
Movie Stars

Solution: Return listbox row index based on search criteria

you can do something like this

dim j
with me.List0
    for j = 0 To .listCount - 1
        if .column(3, j) = customerNumber then
            .selected(j) = true
            exit For
        end if
    next
end with