View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
kirkm[_6_] kirkm[_6_] is offline
external usenet poster
 
Posts: 156
Default Advice on List Box Search


Hi,

I'm using a list box with multi columns as a method of display.
The list box has a tabstrip and it's click event sorts by that column.
The list box source is a worksheet.

As the columns are sorted I'd like to keep the selected item
highlighted.

The following is done before the sort.

x = List1.ListIndex
List1.BoundColumn = 2
m$ = List1
List1.BoundColumn = 3
m$ = m$ & List1
List1.BoundColumn = 4
m$ = m$ & List1

After the sort I'd like to set list index to the 'same' row.

What is the best way to do this? I can only think of
a line by line search looking for a match for m$. But this
doesn't seem very efficient. I may also be doing this all
completely the wrong way.

Thanks - Kirk