I have the following code which when ran gives me my message box that the "Name Not Found", even though it is there.
Using the macro recorder to do this Find, I inserted this part
like this
This will find the name but it gives me a Type Mismatch error
What do I have wrong, please
h.h.
Code:
Sub SearchForName()
Dim Name As Variant
Dim FindName As Variant
Name = InputBox(Prompt:="Please Enter the Name You Want to Find", _
Title:=" SEARCH")
If Name = "" Then Exit Sub
Set FindName = Range("B4:B65536").Find(What:=Name, After:=Range("B4"), LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
If Not FindName Is Nothing Then
MsgBox Prompt:="Name Not Found.", Title:=" SORRY"
Exit Sub
End If
End Sub
Using the macro recorder to do this Find, I inserted this part
Code:
SearchFormat:=False).Activate
Code:
MatchCase:=False, SearchFormat:=False).Activate
What do I have wrong, please
h.h.