A
Agustus
Hi all,
I tried to find a string in selected cells with the following code with
no success:
Sub Findstr()
Dim myStr As String
myStr = InputBox("Enter word to be searched")
If myStr = "" Then Exit Sub
With Selection.Characters(Start:=InStr(1, ActiveCell.Value, myStr), _
Length:=Len(myStr)).Font
.FontStyle = "Bold"
.ColorIndex = 3
End With
End Sub
Any advice on improving the code is much appreciated.
TIA.
I tried to find a string in selected cells with the following code with
no success:
Sub Findstr()
Dim myStr As String
myStr = InputBox("Enter word to be searched")
If myStr = "" Then Exit Sub
With Selection.Characters(Start:=InStr(1, ActiveCell.Value, myStr), _
Length:=Len(myStr)).Font
.FontStyle = "Bold"
.ColorIndex = 3
End With
End Sub
Any advice on improving the code is much appreciated.
TIA.