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
296 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 80

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 80

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now