Getting information from access table in excel

  • Thread starter Thread starter 3g.kayak
  • Start date Start date
3

3g.kayak

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").Value
 
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").Value

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
 
Back
Top