Posts by MaryCo14

    Hi!

    I just started to use VBA into excel and I'm trying to create a User Form where I select data from the active sheet (the Userform shall be duplicated once I duplicate the sheet where it is included and all the reference shall be to te active sheet):

    - the Userform is named "SystemDesignUserForm"

    - the actual sheet where it is included is named "System Design"

    - the ComboBox is named "DIAComboBox" and shall list the data included into cells "w6:w33".


    I tried with the code:


    Code
    1. Private Sub SystemDesignUserForm_Initialize()
    2. DIAComboBox.List = Range("W6:W33").Value
    3. End Sub


    and also with


    Code
    1. Private Sub SystemDesignUserForm_Initialize()
    2. DIAComboBox.List = ActiveSheet.Range("W6:W33").Value
    3. End Sub


    and with:


    Code
    1. Private Sub SystemDesignUserForm_Initialize()
    2. DIAComboBox.List = Worksheets("System Design").Range("W6:W33").Value
    3. End Sub



    but it doesn't wotk: the combobox appear void.

    I attach the xlsx file to see what I'm doing.

    Everythink work, except the combobox :(


    Do you have any suggestion?

    Files

    • TEST.xlsm

      (352.17 kB, downloaded 72 times, last: )