Where am I going wrong?
I simply want to search a sheet and find the first cell with the entry.
I created a button to show a search box asking what to look for but it gives me errors at the end run. I figured it is missing commands telling it what to do when it finds, what it is looking for. I tried some stuff but am still to ignorant at vba. I left the description of what I was trying to do in the code. but erased the code as it had me all kinds of confused.
The code is actually snippets I pulled from other code so if there is a better way to do this I am open minded.
Sub searchsheet() 'Opens box and ask what do they want to search searchthis = InputBox("Type in a location keyword.", "Property Search") 'Tells where to search Columns("A:F").Select 'and then search in them whatever the user entered: Selection.Find(What:=searchthis, After:=ActiveCell, LookIn:= _ xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _ xlNext, MatchCase:=False, SearchFormat:=False).Activate 'if found go to first found 'if not found show message box saying it cannot be found End Sub
Once again thanks in advance.