It's a ListBox (Form Control) added via Developer / Insert Controls etc
Ollie
Main Topics
Browse All TopicsHi I want to add the input data from an input box into my list box form.
I have a list box form which looks up a range of data A1:A10 which are Customer names.
I have created a button which asks "enter new customer" but i don't know how to add the entry into my list box.
Can anyone please help. I have attached by button click code that i have so far.
thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
if you want to stick with the Form Control I think you will need to use a Named Range to refer to your look up. Then your button click event can add the new name, sort the list and expand the named range so your control sees the add.
Something like this: (The names Range "ListOfNames" refers to A1:A10 and grows as you add names with the input box.
Ollie,
I realise the question is closed but I thought you would find the alternative syntax useful as it is not limited by 65536 rows. It's unlikely that you will have a list that long but the idea of the syntax I have used is that it will work on Excel 2002 as well as 2007.
The parameter 'endrow' is not really needed but perhaps it makes it easier to understand - all the same I have removed it.
I have also made it sort the list every time you press the button even though no entry has been made - this allows you to edit the list and yet have it sorted automatically without having to enter a new name.
It's all in the attached file.
Patrick
Business Accounts
Answer for Membership
by: patrickabPosted on 2009-10-27 at 03:30:01ID: 25670748
manhoodo,
What do you mean by a 'ListBox'? Do you mean a ListBox on a Userform or do you really mean a Data Validation dropdown?
Patrick