boyracer3000
Programmer
I'd like to create a macro to run the find menu (Ctrl+F). I think it is probably quite simple but don't know the correct code to make it show. I tried recording it but can't stop while the find menu is open.
Ideally I'd like to make a custom form along the lines of
Dim Query As String
Query = txtDetails.Value
Range("A1".Select
Cells.find(What:=Query, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
this has worked when the data is present but when erroneous data is input I get an error message. Any help appreciated thanks.
Ideally I'd like to make a custom form along the lines of
Dim Query As String
Query = txtDetails.Value
Range("A1".Select
Cells.find(What:=Query, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
this has worked when the data is present but when erroneous data is input I get an error message. Any help appreciated thanks.