Binding data to a ListBox without using cells
Hi Max
use this to feed the form:
Sub feedtheform()
mylist = Array("red", "orange", "green")
UserForm1.ComboBox1.List = mylist
UserForm1.Show
End Sub
and this to get your value
Private Sub ComboBox1_Change()
dim myvalue as integer
myvalue = UserForm1.ComboBox1.ListIndex + 1
MsgBox myvalue
End Sub
Hope this helps.
|