Hi scottiex,
Yeh, I keep thinking of adaptations and uses of this “real-time pseudo intellisense search” stuff to speed up me getting at stuff in long lists of mine all over the place.. .. like buttons to click on to select a different data file … I might even think of changing the .Find to some other thing like a Match working with wild cards on a closed Workbook range reference…etc.. etc… possibilities are endless…
( Adding a solution to a Solved thread is all good ( and allowed
)
_.................................
_._________________________
Hi AlphaFrog,

Originally Posted by
AlphaFrog
first column .. is the row number but your column width .. too narrow ….
[embarrassed]Ah, how stupid of me [/embarrassed]
I guess the _ : _ when I look again was not a colon , but rather just the start of the missing number characters….
So further experimenting:-
it appears things all start here at “base” 0 .. so we have three columns _ 0 _ 1 _ 2
It appears I must do an _ .Add _
That _ .Add _ will increase the .ListCount by 1
( If I wish, I may give an item with the _ .Add _ , and that will go in the first column, column number 0 .
If I choose to give an item , I can also choose to decide at which index ( row in the list box ) that it goes ( up to the ListBox “rows” ( index) so far _ .Added ) .
If I do not give an index , then it will default to the current one being _ .Added ).
I can put things into any place in the list box ( up to the item number .Added so far ) , including the first column, using the _ .List(y, x) thingy _ .
If at each loop I want to add things into the ListBox “columns” after the _ .Add _ , into the same ListBox “row” _ .Added , then I will need to subtract 1 as the .ListCount was increased by 1 by the _ .Add
)
( A bit unusual for an Index to start at 0, but never mind, it is all a bit perverse ** )
So all these do the same, ( with some bits being redundant ) ..
With Me.ListBox1
.AddItem pvargitem:="Anyfink To be overwritten at the next line", pvargindex:=.ListCount
.List(.ListCount - 1, 0) = Found.Row
.List(.ListCount - 1, 1) = Found.Value 'Name
.List(.ListCount - 1, 2) = Found.Offset(0, 1).Value 'Kcal
End With
With Me.ListBox1
.AddItem pvargindex:=.ListCount
.List(.ListCount - 1, 0) = Found.Row
.List(.ListCount - 1, 1) = Found.Value 'Name
.List(.ListCount - 1, 2) = Found.Offset(0, 1).Value 'Kcal
End With
With Me.ListBox1
.AddItem
.List(.ListCount - 1, 0) = Found.Row
.List(.ListCount - 1, 1) = Found.Value 'Name
.List(.ListCount - 1, 2) = Found.Offset(0, 1).Value 'Kcal
End With
With Me.ListBox1
.AddItem Found.Row
.List(.ListCount - 1, 1) = Found.Value 'Name
.List(.ListCount - 1, 2) = Found.Offset(0, 1).Value 'Kcal
End With
I am still guessing that the .Value returns the value in the first “column” in the list box at the “row” in the list box which I have selected.
I think I have it sussed. Just a strange perverse way of doing things, - I guess that is where the named arguments come from
PerverseArgumentindex:=
PerverseArgumentitem:=
Alan
Bookmarks