PDA

View Full Version : Automatic alphabetic scrolling in a listbox



ukdane
03-02-2009, 12:43 AM
If I have a listbox on a worksheet, which has been generated using the List option in Data Validation, how can I get it to automatically scroll throught the alphabet.

For example if I have a list the contains 10 items, and the eight item is "Mars" If the user activates the cell, and then begins to type M (it rolls down to words that start with M.
If the user then types A, it rolls through to words starting with MA.
And so on and so forth.

At the moment this isn't an option, how can I get the listbox to do this?

(Using Excel 2003)
Note this is on a worksheet, not a listbox on a form.

mdmackillop
03-02-2009, 01:30 AM
A combobox has this facility. Is your data ordered? If not you can order it and add it using the List metthod. See the example here (http://www.vbaexpress.com/forum/showpost.php?p=177329&postcount=17)

ukdane
03-02-2009, 05:12 AM
If you look at the attached Excel workbook,
The Worksheet data contains the days of the week, listed alphabetically.
The other worksheet contains a listbox (created from the Data Validation menu) in field A1.

All I want is for the user to be able to (for example) type M in the field A1, and it will automatically roll to Monday.

If the user begun to Type T, it would show Thursday, if they then typed U, it would show Tuesday (combining T and U).

Is this not possible using this function, Do I have to use a combobox?

mdmackillop
03-02-2009, 06:51 AM
What you have is data validation, not a listbox.

ukdane
03-02-2009, 07:41 AM
Fair enough,
Is it possible to have a similar function for data validation, or would I need to create a ListBox of ComboBox.

georgiboy
03-02-2009, 08:24 AM
This was given to me once, you may be able to adapt it to your needs.