View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default ListBox Item Row Number

Laurence Lombard formulated the question :
Is there an easy way to find the sourcelist row number of a listbox item.
Something like Rownumber = ListBox1.Row

One way would be to have a helper column with all the row numbers and use
that column as the BoundColumn, but I was wondering if there was something
more direct

Thanks
Laurence


Listbox uses the ListIndex property for the position of a selected
item. Note that this is zero-based and so...

RowNumber = ListBox1.ListIndex + 1

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion