PC Review


Reply
Thread Tools Rate Thread

Re: ListBox Item Row Number

 
 
GS
Guest
Posts: n/a
 
      18th Sep 2012
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Double click item in Listbox to select item and close Listbox =?Utf-8?B?R3VzRXZhbnM=?= Microsoft Excel Programming 3 19th Jul 2007 12:36 PM
ListBox with header row, delete row, protect header row =?Utf-8?B?bWlrZW9sc29u?= Microsoft Excel Programming 2 12th Mar 2007 03:59 AM
Listbox item added with client scripts not submitting with ASP:Listbox Simon Prince Microsoft ASP .NET 2 19th Oct 2004 05:11 PM
Moving listbox item from listbox to listbox Kevin Quigley Microsoft Dot NET 2 2nd Jun 2004 11:34 AM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Microsoft Excel Programming 0 22nd Oct 2003 12:46 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:09 PM.