Hey guys,
I have created a search field in the top of my excel spreadsheet with a list of a couple hundred names.
I created the search function and it all works great. Only problem I have is that I have to enter the value that is being searched for in the macro. So I put in a textbox next to the search button. So someone who searches can just enter the name in the box, hit the search button, thereby run the macro and then search the document. For some reason I can't seem to get it to work to take the value from the textbox to search though.
What am I doing wrong? can anyone help?
Thanks,
Alex
Public Sub Test2()
Dim c
For Each c In ActiveSheet.Range("A8:J9999")
If c.Value = TextBoxes("txtInputMsg").Value Then 'This is where your search text goes
c.Select
Exit For
End If
Next
End Sub
Bookmarks