Hi,
Is this what you want?
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
ListBox1.Value = TextBox1.Value
MsgBox ListBox1.ListIndex
"droopy928gt" wrote:
Dear all,
I've got a question on listboxes which I can't find an answer for nor
figure it out myself if what I want is at all possible.
I use a textbox in combination with a listbox to find and select items.
For the listbox the multiselect property is true and liststyle is set
to options.
What I do is to type in the textbox and depending upon what is typed an
item is selected in the listbox, being its listindex is set BUT NOT its
selected property.
This all works well basically except for the fact that you can't see
which items listindex is set unless you set focus to the listbox. When
an items selected property is set though its both highlighted and its
checkbox is set.
The question basically is if its possible to highlight an item in the
listbox without setting its selected property.
OR
If someone knows of a way to show which listbox items listindex is
currently set without the listbox having the focus.
Thanks for any ideas and tips.
Best regards,
Leon v/d Willik
--
droopy928gt
------------------------------------------------------------------------
droopy928gt's Profile: http://www.excelforum.com/member.php...o&userid=30232
View this thread: http://www.excelforum.com/showthread...hreadid=505659