+ Reply to Thread
Results 1 to 6 of 6

Load a ListBox from a Named Range in Excel using DAO

  1. #1
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Load a ListBox from a Named Range in Excel using DAO

    Hi,

    I'm feeling a little dumb right now and need some help (again). I found a webpage explaining how to 'Load a ListBox from a Named Range in Excel using DAO' and sounds like a neat trick, but can't get an example to work. If anyone can put an example together to demonstrate how this works then I would be grateful.

    Thanks.

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  2. #2
    Registered User
    Join Date
    01-09-2013
    Location
    Vietnam
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Load a ListBox from a Named Range in Excel using DAO

    Quote Originally Posted by abousetta View Post
    Hi,

    I'm feeling a little dumb right now and need some help (again). I found a webpage explaining how to 'Load a ListBox from a Named Range in Excel using DAO' and sounds like a neat trick, but can't get an example to work. If anyone can put an example together to demonstrate how this works then I would be grateful.

    Thanks.

    abousetta
    You should up excel database in here, If i can I will help you to do this by ADO.

  3. #3
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Load a ListBox from a Named Range in Excel using DAO

    The problem with using DAO as opposed to ADO in that example is that (as far as I can see) you'd need Access installed on the machine.

    Here's an example using ADO - you'll obviously need to change the path of "Source.xlsx"

    It's worth noting there are some weird things that happen with datatypes and stuff when using Excel as a data source - http://support.microsoft.com/kb/257819

    The driver also would need changing if you were to use on .xls files to a jet Provider
    Attached Files Attached Files
    Last edited by Kyle123; 01-10-2013 at 05:38 AM.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Load a ListBox from a Named Range in Excel using DAO

    could you be more specific about the problem you are facing with it? (note a dynamic named range in a closed workbook won't work with either dao or ado)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  5. #5
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Load a ListBox from a Named Range in Excel using DAO

    Thanks Kyle and everyone for your support. Kyle, your example works great and I was able to use it along with the reference you provided to resolve the issues with the original code. I noticed that I was using an apostrophe instead of a slanted single quote which was throwing an error.

    I will read the article in more depth and try to learn a new technique.

    Thanks again.

    Best wishes,

    abousetta

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Load a ListBox from a Named Range in Excel using DAO

    Thanks for the feedback, glad you got it sorted

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1