When the selection chosen in Combobox3 is changed the following code runs. The issue occurs at the following lines
ComboBox1.List = .Range("AA2" & .Range("AA" & Rows.Count).End(xlUp).Row).Value
The actual error is Run-time error '381': Invalid property array index
any help identifying the issue would be greatly appreciated.
Looking at the property window for Combox1 the ListFillRange is empty, so it can't be this that is causing the error.
Private Sub ComboBox3_Change()
Dim indexDept As Long
indexDept = ComboBox3.ListIndex
ComboBox1.Clear
Select Case indexDept
Case Is = 0
With Worksheets("Sheet2")
ComboBox1.List = .Range("AA2" & .Range("AA" & Rows.Count).End(xlUp).Row).Value
End With
Case Is = 1
With Worksheets("Sheet3")
ComboBox1.List = .Range("AA2" & .Range("AA" & Rows.Count).End(xlUp).Row).Value
End With
End Select
End Sub
Bookmarks