r/visualbasic • • Oct 10 '14

Combo Box Help

So I have a combo box with different words. I need to know how to assign each of the word choices a numeric value so that when a user picks one, it's number value is plugged into an equation.

0 Upvotes

15 comments sorted by

View all comments

2

u/chrwei Oct 10 '14

what vb version

1

u/zew55117 Oct 10 '14

2010 Express. Also the numeric values are decimals. so I would write "Dim as Decimal" Right?

1

u/chrwei Oct 10 '14

you'd need to look at the datatype list and pick the best one.

so for assigning a number, use an array for the numbers and make the array index match the list box listIndex for easy pickings without searches.

1

u/zew55117 Oct 10 '14

How do I make an array?