Wrox Programmer Forums
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 3rd, 2008, 06:31 AM
Registered User
Join Date: May 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Combobox List Fill Range

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.


Old July 29th, 2008, 05:04 PM
Friend of Wrox
Join Date: Feb 2007
Posts: 163
Thanks: 0
Thanked 2 Times in 2 Posts

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.

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to fill the combobox with data from different alfiecrosby General .NET 0 May 14th, 2008 10:54 AM
Fill DataGrid based on the selection in combobox drani C# 12 October 11th, 2007 05:41 PM
Can't fill up list of Staff Name in the combobox VS2005 Visual Basic 2005 Basics 3 October 12th, 2006 09:06 AM
How to fill a combobox with the items from a query MacDevv C# 1 August 21st, 2006 07:59 AM
fill dropdown list with items when parent list isaac_cm Pro PHP 1 July 10th, 2006 05:41 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.