+ Reply to Thread
Results 1 to 9 of 9

ActiveX Combobox ListFillRange

  1. #1
    Registered User
    Join Date
    04-29-2017
    Location
    London
    MS-Off Ver
    2016 Professional
    Posts
    50

    ActiveX Combobox ListFillRange

    I have an ActiveX ComboBox on sheet 2 which I am trying to populate with a dynamic named range on sheet 6. The dynamic named range has 2 columns both of which I wish to see in the combobox list. I have tried various suggestions from previous posts, couple of examples below, but I am missing something. The named range is not part of a table and being defined using the Offset function

    =OFFSET('Implement Defaults'!$B$10,0,0,COUNTA('Implement Defaults'!C2:C9999),2)


    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

    Any ideas where I am going wrong
    Last edited by rabbit_post; 02-11-2018 at 02:48 PM.

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: ActiveX Combobox ListFillRange

    Quote Originally Posted by rabbit_post View Post
    I have an ActiveX ComboBox on sheet 2 which I am trying to populate with a dynamic named range on sheet 6. The dynamic named range has 2 columns both of which I wish to see in the combobox list. I have tried various suggestions from previous posts, couple of examples below, but I am missing something. The named range is not part of a table and being defined using the Offset function

    =OFFSET('Implement Defaults'!$B$10,0,0,COUNTA('Implement Defaults'!C2:C9999),2)


    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

    Any ideas where I am going wrong
    could be column widths need to be defined.
    Please Login or Register  to view this content.
    or whatever width you want
    And i would delete this line
    Please Login or Register  to view this content.
    Since ListFillRange is a parameter in the properties, it will reflect whatever the last value it was given and does not need to be cleared beforehand.
    Please Login or Register  to view this content.
    The .Address is correct, but I am not so sure about the '(External = True)' part. Don't know if the Properties class is set up to accept that.
    Last edited by JLGWhiz; 02-11-2018 at 04:09 PM.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: ActiveX Combobox ListFillRange

    Hi all- ListFillRange requires an address or the name of a named range as a string, so:
    Please Login or Register  to view this content.
    implementList is assumed to have workbook scope.
    Last edited by leelnich; 02-13-2018 at 11:44 PM.
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  4. #4
    Registered User
    Join Date
    04-29-2017
    Location
    London
    MS-Off Ver
    2016 Professional
    Posts
    50

    Re: ActiveX Combobox ListFillRange

    Hi Whiz

    I have tried your various suggestions but I still receive a runtime error 1004 and the list is not populated

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-29-2017
    Location
    London
    MS-Off Ver
    2016 Professional
    Posts
    50

    Re: ActiveX Combobox ListFillRange

    Hi lee

    I have tried as you have suggested but the combobox does not populate. it is set to have 2 columns and the widths of each have been set to 50pt

  6. #6
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: ActiveX Combobox ListFillRange

    My post #2 was edited to show this for the listfillrange.
    Please Login or Register  to view this content.
    Since your fill range is on a different sheet than your combobox, you will need the sheet reference and the cell range address in A1 formst. The second = symbol inside the quote marks is not needed.
    Please Login or Register  to view this content.
    I think that one should do it.

  7. #7
    Registered User
    Join Date
    04-29-2017
    Location
    London
    MS-Off Ver
    2016 Professional
    Posts
    50

    Re: ActiveX Combobox ListFillRange

    Unfortunately this still reports a runtime error. I have removed the dynamic range and used a static range instead. When the range is placed on the same sheet there are no issues, when placed on another sheet the problem persists

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: ActiveX Combobox ListFillRange

    Why not something like this.
    You can put either this in Code Module of Sheet2
    Please Login or Register  to view this content.
    or this in Code Module of Sheet6
    Please Login or Register  to view this content.
    Last edited by bakerman2; 02-11-2018 at 11:03 PM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  9. #9
    Registered User
    Join Date
    04-29-2017
    Location
    London
    MS-Off Ver
    2016 Professional
    Posts
    50

    Re: ActiveX Combobox ListFillRange

    Thank you for all your suggestions. I have now given up using the ActiveX Combobox and accepted the limitation of just using Data Validation. The ActiveX was causing additional errors with a series of On Change events.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Dynamic ListFillRange for ActiveX Listbox
    By PFDave in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-15-2016, 08:01 AM
  2. ActiveX ComboBox Control: add items without using ListFillRange Property
    By Axmed.cm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2016, 09:53 AM
  3. [SOLVED] limits of what you can and cannot fill a listfillrange with for ActiveX-Control Listbox
    By cmore in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-22-2013, 10:49 AM
  4. [SOLVED] Not able to populate ActiveX Combobox control, listfillrange with rowlist
    By SAGAR KHOLLAM in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-10-2012, 03:54 AM
  5. ActiveX ComboBox ListFillRange only updates when I close and reopen the workbook
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-16-2012, 08:57 AM
  6. ActiveX ComboBox listfillrange automatic update
    By Makafi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2009, 01:54 PM
  7. ListfillRange for ComboBox
    By oldbyte in forum Excel General
    Replies: 0
    Last Post: 02-23-2005, 05:35 PM

Tags for this Thread

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