Solved

The best way to develop a drop-down-list controlled by a macro in a User Form for data-entry

Posted on 2013-05-26
3
313 Views
Last Modified: 2013-05-28
My question is if there is a user form controlled by a macro, that when the data-entry user select a cell a macro is activated with a drop-down-list where the user can select an option and if in the options provided there is not a best one, then the user can add their own. There are several way to do this but I will like if somebody have a macro example, please provide it to me I will modify as required. I have several macros that do this process differently, one read the data to be selected from several cells from a worksheet and I have other that everything is in the macro. Please, let me know which way is the best

Thank you very much

Dennis Cantellops
US FDA
0
Comment
Question by:dcantel1
  • 2
3 Comments
 
LVL 81

Expert Comment

by:byundt
ID: 39197892
Dennis,
The trick is to use a ComboBox control on your userform. You can use the RowSource property of that ComboBox to fill the dropdown with your default choices.

Brad
UserformComboBoxQ28139372.xlsm
0
 
LVL 81

Accepted Solution

by:
byundt earned 500 total points
ID: 39197899
Another way to do the dropdown does not require macros or a userform. Instead, you use a Data Validation dropdown. You can link its source to a named range. You can also turn off the warning message if the user types in a different value than one of the choices (uncheck the "Show error alert after invalid data is entered" on the Error Alert tab of the Data Validation dialog).
UserformComboBoxQ28139372.xlsm
0
 

Author Closing Comment

by:dcantel1
ID: 39203338
Very nice example.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Outlook Free & Paid Tools
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question