Getting information from access table in excel

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
 
G

GS

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top