Hi all,
I am making a search box in excel using macros. I defined a cell for entering the search word and a command button which once clicked will color the row where the search word is located. I read that using the change event of a text box, this can be modified in order to be able, as you type in the textbox, to have a coloring of the matching rows in real time.
I don't actually know how to incorporate that to my original code and replace the command button object with a textbox.
Any help appreciated.
Thank you
Private Sub CommandButton2_Click()
Dim rng As Range
Dim company As Long
Dim Property As Long
Dim rcell As Range
Dim i As Integer


If Range("E6").Value = "" Then
MsgBox "No input"
Else
    For i = 13 To 88
        If InStr(Range("D" & i).Value, Range("E6").Value) Or InStr(UCase(Range("D" & i).Value), UCase(Range("E6").Value)) Then
           Cells.Range("D" & i).Interior.Color = vbGreen
        End If
    Next i
    
End If

End Sub
Private Sub TextBox1_Change()

End Sub