"How do i get the header row from the worksheet "YBS", Range A1:A4 into the listbox as a header row? "
I've added the following into Private Sub UserForm_Initialize()
[vba]lbxResults.ColumnCount = 4
lbxResults.RowSource = ("YBS!A1
1")[/vba]
This does add the column headers, however when i now click search (after replacing both ArrayOfMatchingRows() and dataRange() ) I now get a Runtime Error 'Unspecified Error'. The debug then highlights the following :
[vba]Private Sub cmdSearch_Click()
Dim foundArray As Variant
With Me
foundArray = ArrayOfMatchingRows(.txtActionedSearch.Text)
With .lbxResults
.Clear
If 0 < UBound(foundArray, 1) Then
.List = foundArray
End If
End With
End With
End Sub[/vba]
Do you have any suggestions for getting around this?