ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Getting information from access table in excel (https://www.excelbanter.com/excel-programming/449376-getting-information-access-table-excel.html)

[email protected]

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

GS[_2_]

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




All times are GMT +1. The time now is 11:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com