+ Reply to Thread
Results 1 to 8 of 8

listbox and combobox not populating properly

  1. #1
    Forum Contributor
    Join Date
    05-06-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    361

    listbox and combobox not populating properly

    Hi, i have a userform where users can log in and enter data. In the "Batch Manager" tab, there is a combobox 2. Users select from this available values and the accompanying data from the worksheet should populate into Listbox4. What is wrong is that it only works if the cell value is alphanumeric, meaning it works for B20171222 but not the rest. The combobox is supposed to populate unique data from column B, but i cant get it to work properly too. Can someone please help to see what is wrong?
    Last edited by bqheng; 08-16-2017 at 04:27 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: listbox and combobox not populating properly

    I think the issue may be in this line of code:

    Please Login or Register  to view this content.
    see if changing that to:

    Please Login or Register  to view this content.
    makes a difference.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    05-06-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    361

    Re: listbox and combobox not populating properly

    hi alan, nope didnt work.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: listbox and combobox not populating properly

    Last thought on this.

    try dropping the .value

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: listbox and combobox not populating properly

    Value from then control is a String and you are comparing Numeric value to String, so not match.
    1) Add one Variant type variable
    Please Login or Register  to view this content.
    2) Add 2 lines
    Please Login or Register  to view this content.
    3) Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    05-06-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    361

    Re: listbox and combobox not populating properly

    Hi jindon, that did the trick! can you please help me with the other problem i mentioned earlier? how do i populate combobox2 with unique values from column B?

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: listbox and combobox not populating properly

    how do i populate combobox2 with unique values from column B?
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    05-06-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    361

    Re: listbox and combobox not populating properly

    Thank you so much jindon! and thank you alan for helping too

+ 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] ComboBox to populate Listbox and 2nd Combobox based on 1st combobox dropdown choice
    By bbqqsmokeman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2017, 08:21 PM
  2. [SOLVED] Populating Listbox based on ComboBox
    By kandoo1 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-06-2017, 03:42 PM
  3. [SOLVED] Populating Multi-Column Listbox with Conditions from Another Listbox
    By ykobure in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-05-2015, 02:28 AM
  4. User Form ListBox - Find Records (ListBox Populating Issue)
    By LONeillSSC in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-20-2015, 12:06 PM
  5. Having problems populating a multicolumn listbox changing Listbox column with a loop.
    By Aristizabal95 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2013, 12:41 PM
  6. [SOLVED] Populating ListBox using value from Combobox via CommandButton
    By Doctor_H in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-04-2013, 05:56 PM
  7. [SOLVED] Can't get combobox to properly fill data based on another combobox.
    By Orestees in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-15-2012, 05:22 PM

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