+ Reply to Thread
Results 1 to 13 of 13

Unable to Populate Range to Combo Box.

  1. #1
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Unable to Populate Range to Combo Box.

    Hi , I am getting error at below line., I could not get any idea why its giving error.

    Please check attachment excel, and click on Admission and then Click "+" in Siblings.

    It should show Combo box named Ref1 and it should be populate the list of Admission No's
    Attached Images Attached Images

  2. #2
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Unable to Populate Range to Combo Box.

    Due to File size restriction I am unable to load File.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Unable to Populate Range to Combo Box.

    Why not upload a stripped down workbook?
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Unable to Populate Range to Combo Box.

    Hi, I Removed all unwanted forms from the this excel just to upload.

    Pls refer attachment and click on Student View button and then select any color button and see the error and advise what is the error.
    Attached Files Attached Files

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Unable to Populate Range to Combo Box.

    I'm not getting the error on the line you indicate, I'm getting it on this line in sub Fill_Listbox1.
    Please Login or Register  to view this content.
    In fact I can't find the code you posted in the attached workbook.

    PS I think the problem with the above code is that you can't use AddItem/List to populate a listbox with more than 10 (?) columns.

  6. #6
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Unable to Populate Range to Combo Box.

    in listbox properties columnscount @ 12
    columnwidth @ 35 pt;120 pt;35 pt;90 pt;0 pt;0 pt;300 pt;0 pt;0 pt;90 pt;90 pt;0 pt

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Kind regards
    Leo

  7. #7
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Unable to Populate Range to Combo Box.

    forgot the file


    Cheers
    Leo
    Attached Files Attached Files

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

    Re: Unable to Populate Range to Combo Box.

    Or just filter in ListBox, that way you don't need AutoFilter or extra sheet.
    Please Login or Register  to view this content.
    Last edited by bakerman2; 04-05-2018 at 08:45 PM. Reason: Added Studentcount in label.
    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
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Unable to Populate Range to Combo Box.

    Thank you Leo and Bakerman2 Both your methods worked absolutely fantastic.. 1 small thing to be added, I need Header as well, pls assist.

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Unable to Populate Range to Combo Box.

    You can't have a header in a listbox unless you use RowSource to populate it.

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

    Re: Unable to Populate Range to Combo Box.

    One way to do it.
    Please Login or Register  to view this content.
    Only downside is when scrolling down headerrow will also disappear.
    Last edited by bakerman2; 04-06-2018 at 02:06 AM.

  12. #12
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Unable to Populate Range to Combo Box.

    You have made my day fresh and long , thanks a million bakerman, this issue was my show stopper and you have resumed it.

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

    Re: Unable to Populate Range to Combo Box.

    Glad to help and thanks for rep+.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Last edited by bakerman2; 04-06-2018 at 06:24 AM.

+ 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] Using Multiple Combo Box Values to populate a cell (Excluding blank combo boxes)
    By mnadamn19 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-10-2016, 08:38 PM
  2. [SOLVED] Using Multiple Combo Box Values to populate a cell (Excluding blank combo boxes)
    By mnadamn19 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2016, 10:49 AM
  3. Using Multiple Combo Box Values to populate a cell (Excluding blank combo boxes)
    By mnadamn19 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2016, 03:45 PM
  4. Populate 2nd combo with alpha based on 1st combo with 2 columns of numeric codes
    By dovermac in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-15-2014, 10:09 AM
  5. [SOLVED] Unable to populate ComboBox with a Named Range
    By RJK in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-22-2012, 06:22 PM
  6. populate combo box from range in different workbook
    By brendonh in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-11-2012, 07:17 PM
  7. [SOLVED] using a worksheet range to populate a combo box in excel
    By Kev in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 05-31-2006, 04:45 AM

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