mattygriff
Programmer
Hi,
I have set up a userform with a combobox that I am dynamically populating from a number of named ranges - the range used is defined by other selections made on the userform.
Everything works fine if the range being used has multiple rows but a couple of them are only single entry and whenever one of these is selected I get "Run-time error '381': Could not set List property. Invalid property array index."
I am using the following code to populate the combobox:
where nr is the name of the range to be used.
Thanks in advance.
I have set up a userform with a combobox that I am dynamically populating from a number of named ranges - the range used is defined by other selections made on the userform.
Everything works fine if the range being used has multiple rows but a couple of them are only single entry and whenever one of these is selected I get "Run-time error '381': Could not set List property. Invalid property array index."
I am using the following code to populate the combobox:
Code:
Private Sub PopulateCombo(nr)
With Me.cboBoundaries
.Clear
.List = Application.Transpose(Range(nr))
End With
End Sub
where nr is the name of the range to be used.
Thanks in advance.