Reputation: 1428
I have this report formatting tool development task and i want to add my userform some comboboxes. When i searched for how to use them on internet, i always saw them, they get their values from an excel sheet. My file already contains 2 sheets and i don't want it to have more. Is it possible to store combobox's values in the code?
http://www.contextures.com/Excel-VBA-ComboBox-Lists.html
Upvotes: 1
Views: 2798
Reputation: 14361
YES IT'S POSSIBLE - if the answer to my comment is YES :)
Try the following code with what you require. Assume you have a VBA code, and you have a combobox1
With ComboBox1
.AddItem "I am"
.AddItem "Adding"
.AddItem "Static"
.AddItem "Values"
.AddItem "From"
.AddItem "VBA"
End With
Let us know if you need anything further. Wish you could update yours question with anything you have trying so far.
Upvotes: 1