View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Getting information from access table in excel

I have inserted an access table into an excel sheet. I would like to
populate a dropbox in a form with the data from that access table. I
can do it by specifying the range as below but I'm guessing there is
a better way.

Form1.DropBox.List =
ThisWorkbook.Sheets("Sheet1").Range("H4:H206").Val ue


I don't know what a 'DropBox' is but you can assign a range directly to
any list control using its List property exactly as you have done
here...

Me.ComboBox1.List = Sheets("Sheet1").Range("H4:H206")
Me.ListBox1.List = Sheets("Sheet1").Range("H4:H206")

...where 'Me' is a keyword that refs the userform (or Form), and the
list control is being populate in its 'Initialize' event.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion