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:
and also with
Code
Private Sub SystemDesignUserForm_Initialize()
DIAComboBox.List = ActiveSheet.Range("W6:W33").Value
End Sub
and with:
Code
Private Sub SystemDesignUserForm_Initialize()
DIAComboBox.List = Worksheets("System Design").Range("W6:W33").Value
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?