View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dirt dirt is offline
external usenet poster
 
Posts: 9
Default combobox population

Help, I have been all over the internet, etc. looking for help. I can't seem to populate a combobox using a variable sized list. I have tried many things but here is my latest attempt...

the data is from a call to a database that returns values to an excel spreadsheet. I want the results of the query to then populate the combobox. I can use the combobox from the forms menu, but it doesn't give me what I need. Can someone please help me?

TIA,

Dan

Sub populate_ab_combobox()

a = 3
Set n = Sheets("Inputs")

Do While n.Cells(1 + a, 19).Value < ""
ab_title = n.Cells(1 + a, 19).Value
a = a + 1
lastrow = a
n.cbx_ab_qry.AddItem ab_title
Loop

End Sub