Search code examples
excelcomboboxexcel-2013vba

Auto populate Combobox from range


I am using Excel 2013 and I have written the below code to auto populate a combobox from a range for one of my userforms. I have the combobox named "Times"

Sometimes this populates the list and other times it gives a blank list even though the range did not change.

Any idea how to stop this and just have it work everytime?

Private Sub UserForm_Initialize()
    Sheets("Backend").Visible = xlSheetVisible
    Times.RowSource = Sheets("Backend").Range("E1:E96").Address
    Sheets("Backend").Visible = xlVeryHidden
End Sub

Solution

  • I have found a different way to do this now that works. Thanks to this post.

    Populate list box with a named range