Excel 2016 Listbox not displaying data

  • Hi All,


    I'm sure this has come up before but I wasn't able to find a topic, so sorry if this is a duplicate.


    My work have only just upgraded to Office 2016 and all users of a Macro I have written are experiencing the same issue (20 devices).


    During the macro a number of values are written into a multi row, multi column listbox which is contained within a userform. This userform is then shown to the user to make a selection.


    Since the upgrade the listbox is not showing its contents. After having populated it, I can retrieve every item in every row and column (using code below) but when the form is shown to the user it is simply blank.


    Code
    Debug.Print listbox.List(1,1)


    I've tried creating a new listbox which does the same thing, I've checked the properties for the listbox which haven't changed.


    I really don't know what is causing this, any assistance will be greatly appreciated.


    Thanks


    Connor

  • Hi, thanks for your responses.


    Bob, it was all there, just not super clear, have now edited my original post for clarity.


    darkorder, I'm not using UserForm_Initialize() at all... My code for populating the listbox is below and was working perfectly up until we were upgraded (and relevant excerpt is below).


    Once populated, its just a case of frmClientSearch.show


  • Hi,

    I hope you have resolved this issue by now. :)


    I have the same problem.

    But similar in a way.

    I'm using rowsource


    When showing the userform,

    The listbox is empty but there data in my rowsource range (listobject)


    Please help! :(

  • Hi,


    Attaching a sample file would be nice :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Seems a clunky way to load a ListBox, this example demonstrates 3 ways to load a Table's contents to a ListBox.


    The example only has two columns but it will work with more columns

  • Hi,


    Attaching a sample file would be nice :)

    Hi Carim,

    Sorry... this is a complex worksheet that reads data from our mainframe through OLEDB.

    I can't really share this workbook

    I solved my problem by moving my errors.show somewhere else.

    I don't understand it but it worked

    But thanks for taking the time

  • Seems a clunky way to load a ListBox, this example demonstrates 3 ways to load a Table's contents to a ListBox.


    The example only has two columns but it will work with more columns

    Thanks for the reply


    I solved my problem by moving my errors.show somewhere else.

    I don't understand it but it worked


    But thanks for taking the time

  • Glad you could fix your problem ;)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!