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
323 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

740 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