Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default ListBox Item Row Number

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
move item from one listbox to another listbox steve Excel Programming 6 March 6th 08 05:02 PM
Remove Item from Listbox by Item Name Randy[_2_] Excel Programming 3 September 19th 07 02:36 PM
Double click item in Listbox to select item and close Listbox GusEvans Excel Programming 3 July 19th 07 12:36 PM
listbox add item Baha Excel Programming 0 December 8th 06 02:37 AM
Count number of selected item in Listbox Todd Huttenstine Excel Programming 4 June 14th 04 06:54 PM


All times are GMT +1. The time now is 07:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"