P
Patrick Molloy
Adding "SearchDirection" and "After" to the Find method
will help. For this the found cell needs to be
selected...actually not quite true, but with the code as
is...
Private Sub CommandButton48_Click()
'MsgBox TextBox86
If TextBox86 <> "" Then
Dim found As Range
With Worksheets("Master").Cells
If found Is Nothing Then Set found = Selection
Set found = .Find(TextBox86, after:=found,
LookIn:=xlValues, searchdirection:=xlNext)
If Not found Is Nothing Then
MsgBox TextBox86 & " Found!" & found.Address
found.Select
Else
MsgBox TextBox86 & " Not Found!"
End If
End With
Else
MsgBox "Search Criteria was empty..."
End If
End Sub
Patrick Molloy
Microsoft Excel MVP
will help. For this the found cell needs to be
selected...actually not quite true, but with the code as
is...
Private Sub CommandButton48_Click()
'MsgBox TextBox86
If TextBox86 <> "" Then
Dim found As Range
With Worksheets("Master").Cells
If found Is Nothing Then Set found = Selection
Set found = .Find(TextBox86, after:=found,
LookIn:=xlValues, searchdirection:=xlNext)
If Not found Is Nothing Then
MsgBox TextBox86 & " Found!" & found.Address
found.Select
Else
MsgBox TextBox86 & " Not Found!"
End If
End With
Else
MsgBox "Search Criteria was empty..."
End If
End Sub
Patrick Molloy
Microsoft Excel MVP