Good morning all, I am having some problems with some code.
I want to be able to search for keywords in a spread sheet with the option to find next. I understand that I can press CTRL-f but I would like to have a cell with a search box. I have done all I can to get this to work but so far all It will do is find one of many keywords and not find the next in the spreadsheet. Code is below. Can anyone help me with this?
Sub Search_Click()
'Opens box and ask what do they want to search
searchthis = InputBox("Go get it Benny.", "Property Search")
'Tells where to search
Columns("A:P").Select
'and then search in them whatever the user entered:
Selection.Find(What:=searchthis, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext).Activate
End Sub
I want to be able to search for keywords in a spread sheet with the option to find next. I understand that I can press CTRL-f but I would like to have a cell with a search box. I have done all I can to get this to work but so far all It will do is find one of many keywords and not find the next in the spreadsheet. Code is below. Can anyone help me with this?
Sub Search_Click()
'Opens box and ask what do they want to search
searchthis = InputBox("Go get it Benny.", "Property Search")
'Tells where to search
Columns("A:P").Select
'and then search in them whatever the user entered:
Selection.Find(What:=searchthis, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext).Activate
End Sub