I have 1 worksheet, a search button and a textbox. I need to loop through column B only to find the text that was entered into the textbox.
Private Sub searchBtn_Click()
Dim strFindWhat As String
strFindWhat = searchTxt.Text
On Error GoTo ErrorMessage
Cells.Find(What:=strFindWhat, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Select
Exit Sub
ErrorMessage:
MsgBox ("The value you entered does not exist")
End Sub
