it should be highlighted as you are setting its value to 10 with code? i there is no Highlight on the listbox, then nothing is selected therefore the its Value is Null (nothing).
Actually, no that is not true. In Form Load I have listPosTo = 10 after the 100 additems. This is so it initially shows 10.
? listPosto shows 10. even though nothing is selected.
Hi. Although you made the Listbox height only tall enough to show one item, that item is not selected until you click on it.Ah, on thinking more I have set a listbox height to 0.6cm to match some other controls. Is this preventing a drop down ?
You can have large data sets using listboxes, here is one holding 46,000 rows. I based it loosely on John Big Booty search listbox found here. You can wheel scroll or use the scroll bars or double click. It would be faster to use a search function with large data sets.If there are too many items to show in a list I would use a combobox.
Hi. I think that's a misconception. If you enlarge your listbox to show two rows of items and click your down arrow a few times, which of the two items displayed is selected?I follow that, but it shouldn't be necessary as you've already just moved the item into view with the up/down things.
However it ain't a perfect world...
I agree with @MajP , I get the same impression about the OP wanting a spinner functionality. However, and this is directed at the OP, if you are populating the choices with values from 1 to 100, I wonder how effective a UI it would be to ask the user to click on a button 100 times to get the value 100?I reread this a few times, and it sounds what you describe is behavior like a spinner control. As you move up and down the value is selected. In the listbox you have to click into the list and select. See if this is the behavior you want. I put both the listbox shrunken down to show one row and a spinner control. The spinner control is an Active X control under MSFORMS
Ah, that would be an advantage of using an ActiveX control over the original Listbox design then. Thanks!Although not suggesting this is a good UI, you actually do not have to click. You can just hold the button and set the delay to a very small number. It will scroll really fast automatically.
I totally agree again!However, still would think a combobox would be the best UI since it sounds like it is not multiselect.
As far as I can tell, none. But you're only showing one item... then that's the one you want.Hi. I think that's a misconception. If you enlarge your listbox to show two rows of items and click your down arrow a few times, which of the two items displayed is selected?
There isn't a rowsource query. That would mean having a table holdeing 1 to 100 ? Isn't additem in a loop far better ?Also, why is your ListBox not bound to a RowSource query so you can avoid writing code to populate it?