View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ivan Raiminius Ivan Raiminius is offline
external usenet poster
 
Posts: 258
Default using a worksheet range to populate a combo box in excel

Hi Kev,

userform1 'name of the userform
combobox1 'name of the combobox
list 'property of the combobox, returns or sets the list entries of a
ListBox or ComboBox

rng 'object which is set to range("a2") - this is the cell which
contains first entry, that should be placed in the combobox (change to
suit your needs)

range(rng.address,rng.End(xlDown).Address).value 'rng.End(xlDown) -
finds the last cell below rng before empty cell, this is used to
construct range from a2 till the last non-empty cell bellow a2,
value(s) from this range are used to fill the combobox1

Please let me know if something is not clear.

Regards,
Ivan