Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Dear all, I've got a question on listboxes which I can't find an answer for no 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 se to options. What I do is to type in the textbox and depending upon what is typed a item is selected in the listbox, being its listindex is set BUT NOT it selected property. This all works well basically except for the fact that you can't se which items listindex is set unless you set focus to the listbox. Whe an items selected property is set though its both highlighted and it checkbox is set. The question basically is if its possible to highlight an item in th listbox without setting its selected property. OR If someone knows of a way to show which listbox items listindex i currently set without the listbox having the focus. Thanks for any ideas and tips. Best regards, Leon v/d Willi -- droopy928g ----------------------------------------------------------------------- droopy928gt's Profile: http://www.excelforum.com/member.php...fo&userid=3023 View this thread: http://www.excelforum.com/showthread.php?threadid=50565 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Topper, Thanks for the tip but this is not what I'm looking for. I want to stay in the textbox while typing and compare typed text to entries in the listbox. Positive compares are followed up by setting the listindex for that listbox value. The problem lies in seeing which listbox items listindex is set while it does not have the focus. That's what I'm trying to overcome. Only when the focus is set to the listbox will the item whose listindex is set show with a dotted lined box around it. When a listbox items selected property is set though both the item will be shown with another color background and also its checkbox will be seen. This regardless if the listbox has focus or not. I was hoping for it to be possible to somehow highlight an item whose listindex is set but not have its selected property set as well. So basically to see what items listindex is set even though the listbox does not have focus. Thanks for any 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello, I was just reading your post and I am having the same trouble have you
figured anything out about how to do this if you have could you please explain how this is done. If i figure it out I will let you know thanks skid "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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Sorry skid but I haven't figured it out yet. The good people on this forum apparently also not. What I think to know now is that it simply aint possible. You can only see a non selected item if the listbox has focus. The problem is when it has focus you can't type. For anyone else reading, Yeah yeah yeah, I know about the MatchEntry property. The problem with it though is it aint working. Apart from that you can't get its typed characters in an editable listbox. If only there would have been the VB GotFocus and LostFocus instead of the louzy VBA Enter and Exit events. Best regards, Leon -- droopy928gt ------------------------------------------------------------------------ droopy928gt's Profile: http://www.excelforum.com/member.php...o&userid=30232 View this thread: http://www.excelforum.com/showthread...hreadid=505659 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Skid, Thanks for the tip but this is unfortunately not what I was looking for. What you've found is how to select an item, meaning a blue bar comes around the item in the listbox and its selected property is set. When the listbox has focus though and an item is selected without its selected property being set to true you'll see a box with dotted lines around the item. This disappears when the listbox looses focus. Thanks though for letting know the solution that worked for you. Best regards, Leon -- droopy928gt ------------------------------------------------------------------------ droopy928gt's Profile: http://www.excelforum.com/member.php...o&userid=30232 View this thread: http://www.excelforum.com/showthread...hreadid=505659 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I select Multiple Items in a Chart | Charts and Charting in Excel | |||
Transferring items between multicolumn listboxes | Excel Discussion (Misc queries) | |||
how do I select one from multiple items | Excel Discussion (Misc queries) | |||
Select Distinct Items in a Column | Excel Programming | |||
Select multiple items in a listbox | Excel Programming |