Hi I have a search form which shows a listbox of results. It starts out empty and when I conduct a search then rows are created but no data is visible. I have checked a few obvious things like color and all seem normal black font etc. If I have the worksheet with the sourcedata in view the data in the list is visible, but in everyday practice that would not be the case. I think it is conducting the search on the correct results but then displaying the equivalent rows from another worksheet. I'm just not sure how to edit the code to avoid this.

[![Invisible listbox data](https://i.stack.imgur.com/n49pd.png)](https://i.stack.imgur.com/n49pd.png)

My userform code is this, I assume the problem is where it is calling the Results range but I have tried adding a worksheet reference of the source data to the start of Range.Records and that doesn't seem to help:

```
Option Explicit

' Display All Matches from Search in Userform ListBox
'
Dim FormEvents As Boolean

Private Sub ClearForm(Except As String)

' Clears the list box and text boxes EXCEPT the text box
' currently having data entered into it

    Select Case Except

        Case "srchStCat"
            FormEvents = False
            srchStID.Value = ""
            srchStSurname.Value = ""
            Results.Clear
            FormEvents = True

        Case "srchStID"
            FormEvents = False
            srchStCat.Value = ""
            srchStSurname.Value = ""
            Results.Clear
            FormEvents = True

        Case "srchStSurname"
            FormEvents = False
            srchStID.Value = ""
            srchStCat.Value = ""
            Results.Clear
            FormEvents = True

        Case Else
            FormEvents = False
            srchStCat.Value = ""
            srchStID.Value = ""
            srchStSurname.Value = ""
            Results.Clear
            FormEvents = True

        End Select

End Sub

Private Sub CmdClear_Click()
    ClearForm ("")
End Sub

Private Sub CmdClose_Click()
    Me.Hide
End Sub

Private Sub srchStCat_Change()

    If FormEvents Then ClearForm ("srchStCat")

End Sub

Private Sub srchStID_Change()

    If FormEvents Then ClearForm ("srchStID")

End Sub

Private Sub srchStSurname_Change()

    If FormEvents Then ClearForm ("srchStSurname")

End Sub

Private Sub CmdSearch_Click()
    Dim SearchTerm As String
    Dim SearchColumn As String
    Dim RecordRange As Range
    Dim FirstAddress As String
    Dim FirstCell As Range
    Dim RowCount As Integer

    ' Display an error if no search term is entered
    If srchStCat.Value = "" And srchStID.Value = "" And srchStSurname.Value = "" Then

        MsgBox "No search term specified", vbCritical + vbOKOnly
        Exit Sub

    End If

    ' Work out what is being searched for
    If srchStCat.Value <> "" Then

        SearchTerm = srchStCat.Value
        SearchColumn = "Current Role"

    End If

    If srchStID.Value <> "" Then

        SearchTerm = srchStID.Value
        SearchColumn = "ID Token"

    End If

    If srchStSurname.Value <> "" Then

        SearchTerm = srchStSurname.Value
        SearchColumn = "Surname"

    End If

    Results.Clear

        ' Only search in the relevant table column i.e. if somone is searching srchStSurname
        ' only search in the srchStSurname column
        With Worksheets("Staff").Range("StaffFullData[" & SearchColumn & "]")

            ' Find the first match
            Set RecordRange = .Find(SearchTerm, LookIn:=xlValues)

            ' If a match has been found
            If Not RecordRange Is Nothing Then

                FirstAddress = RecordRange.Address
                RowCount = 0

                Do

                    ' Set the first cell in the row of the matching value
                    Set FirstCell = Range("A" & RecordRange.Row)

                    ' Add matching record to List Box
                    Results.AddItem
                    Results.List(RowCount, 0) = FirstCell(1, 2)
                    Results.List(RowCount, 1) = FirstCell(1, 7)
                    Results.List(RowCount, 2) = FirstCell(1, 5)
                    Results.List(RowCount, 3) = FirstCell(1, 18)

                    RowCount = RowCount + 1

                    ' Look for next match
                    Set RecordRange = .FindNext(RecordRange)

                    ' When no further matches are found, exit the sub
                    If RecordRange Is Nothing Then

                        Exit Sub

                    End If

                ' Keep looking while unique matches are found
                Loop While RecordRange.Address <> FirstAddress

            Else

                ' If you get here, no matches were found
                Results.AddItem
                Results.List(RowCount, 0) = "Nothing Found"

            End If

        End With
End Sub

Private Sub UserForm_Initialize()

    FormEvents = True

End Sub

Private Sub Results_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim i As Long
With Me.Results
    For i = 0 To .ListCount - 1
        If .Selected(i) Then
            Me.TextBoxGetStaffFName.Value = .List(i, 1)
            Me.TextBoxGetStaffSurname.Value = .List(i, 2)
            Me.TextBoxGetStaffID.Value = .List(i, 0)
            Exit For
        End If
    Next
End With
End Sub

```