Subject: Combobox List Fill Range
Posted By: jani Post Date: 7/3/2008 6:31:45 AM
Hi VBA Access Guru's

I am unable to give dynamic listfillrange for a combobox. I have combobox in sheet 'abc' and data on sheet 'dropdown'. below is the code

cmbCities.ListFillRange = dropdownsheet.name!sdropdownrange

however i am getting the right sdropdownrange and valid sheet name.
but it all together doesn't work.

plz help ASAP.

Jani

Reply By: allenm Reply Date: 7/29/2008 5:04:09 PM
ListFillRange is used in Excel.  What you would want to use for Access is RowSource.

Try using cmbCities.RowSource = sSQL 'Where sSQL = attach string to your table / linked sheet (i.e. "Select * From TableName")

If this is for Excel then you may try using cmbCities.ListFillRange = Worksheets("Sheet Name").range(sdropdownrange)

If this isn't what you're looking for then further information and/or code sample and/or better description about what you're attempting would be required.

Hopefully this helped.
Al


Go to topic 73074

Return to index page 1