ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   NewIndex for ListBox? (https://www.excelbanter.com/excel-programming/334724-newindex-listbox.html)

OKLover[_2_]

NewIndex for ListBox?
 
How do I get the listindex of the item which is most recently added to the
listbox which is sorted?

moi

NewIndex for ListBox?
 
Cool question. Got no steady clue.
Maybe after adding an item to your listbox, store it's value somewhere far
away in a cell and call that cell if you need the value again.
If you add another more item to the list, just overwrite the cell so it's
always update.
But that will only work with unique listitems...



"OKLover" schreef in bericht
...
How do I get the listindex of the item which is most recently added to
the
listbox which is sorted?




Bob Phillips[_7_]

NewIndex for ListBox?
 
ListBox1.ListCount


--
HTH

Bob Phillips

"OKLover" wrote in message
...
How do I get the listindex of the item which is most recently added to

the
listbox which is sorted?




OKLover[_2_]

NewIndex for ListBox?
 
Whe the Listbox is sorted, the ListBox.ListCount may be not equal to the
'NewIndex'

"Bob Phillips" wrote:

ListBox1.ListCount


--
HTH

Bob Phillips

"OKLover" wrote in message
...
How do I get the listindex of the item which is most recently added to

the
listbox which is sorted?





Bob Phillips[_7_]

NewIndex for ListBox?
 
No, but it is before you sort it.

--
HTH

Bob Phillips

"OKLover" wrote in message
...
Whe the Listbox is sorted, the ListBox.ListCount may be not equal to the
'NewIndex'

"Bob Phillips" wrote:

ListBox1.ListCount


--
HTH

Bob Phillips

"OKLover" wrote in message
...
How do I get the listindex of the item which is most recently added

to
the
listbox which is sorted?







Bob Phillips[_7_]

NewIndex for ListBox?
 
Or even ListCount + 1 before you add it.

--
HTH

Bob Phillips

"OKLover" wrote in message
...
Whe the Listbox is sorted, the ListBox.ListCount may be not equal to the
'NewIndex'

"Bob Phillips" wrote:

ListBox1.ListCount


--
HTH

Bob Phillips

"OKLover" wrote in message
...
How do I get the listindex of the item which is most recently added

to
the
listbox which is sorted?








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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com