VBA – Code or Program a Data Validation List

Associated Files Download Links


Most users are familiar with restricting a cell’s input to a data validation list. There are times however where you would like this list to be dynamic, or you may need to program it. This code example will let you set the data validation list from a string variable.

Code a Data Validation List in VBA

The following code places a custom data validation list in cell A1 creating the list from the variable Choices. You can change Input Title, Input Message, etc. by typing what you would like between the “”

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro – A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!

alt text

Learn More!


<<Return to VBA Examples

Did you find this VBA tutorial useful? Then share it with your friends and colleagues: