Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I found it -
It turns out that the listbox was not enabled (.enabled = FALSE) before the code that "selected" the list items. After this process, I enabled the control. And the hi-lighting was not there, although the list item(s) were in fact activated. If I enable this control before making these selections, they show up fine. Thanks again for your help - sometimes all it takes is some simple code like yours that "works" to help with troubleshooting! Dan "Dan" wrote: Thanks again Norman - I see what's going on but I don't know why. If you can, please let me know if you have any ideas for troubleshooting this? I have a loop, which is doing various things unrelated to this listbox. Inside this loop, I check some values in the spreadsheet to determine which items in the listbox need to be hilighted, and do it. So I need to be in some sort of a loop I think. If I move my code outside of this loop, and just force it to "select" items in the listbox, it works. But inside the loop it does not. In fact, if I "select" items inside my loop, it fires the listbox_Change() event. So I know it's selecting the item(s). But on the list, nothing is hilighted for some reason. Even if I just tell it to select one arbitrary item in the list, like: lstActivityCode.select(3)=TRUE it doesn't hilight it. But if I move this code just outside the loop that's running, it does work. I am trying to isolated what's going on, but if you have any troubleshooting tips, I'd love to hear them. Thanks, Dan "Norman Jones" wrote: Hi Dan, Using the suggested code - for me - the Userform is displayed and the second and fourth ListBox items are selected / highlighted - the Selected property returns a zero-based array. --- Regards, Norman "Dan" wrote in message ... Thanks Norman - That's what I tried, and while it makes that particular list item "active" (that is, it fires the _Change() event), it doesn't show up as hilighted. What I am looking for is a visual indication that this partcular item (or more than one) is selected already. I tried changing the list box so that it showed check-boxes, but that also doesn't show any selection. I guess I need something that acts the same as if the user clicked on the list item(s), as that is what hilights it during run time. Dan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a way to sort a list of multi-line items? | Excel Worksheet Functions | |||
Last list item selected in a Multi-Select list box? | Excel Programming | |||
Putting items from list box multi-select onto worksheet | Excel Programming | |||
Extract values from a multi-select multi-column list-box | Excel Programming | |||
Multi Select List Box | Excel Programming |