View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Roman[_4_] Roman[_4_] is offline
external usenet poster
 
Posts: 93
Default 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.