Hi,
I need your help to simplify my searches. The goal is to have a text box where I can input a word withing my sheet and when I press the Search button it highlights all the cells with the same search value in yellow. So far I have a text box (TextBox1), a Search button, and a reset button. I'm stock trying to attach the text box to the button's macro.
The macro attached to the Search button is the following:
Any idea in how to have this macro look up the word within my text box instead of looking up a specific value such as "Paul"?
I need your help to simplify my searches. The goal is to have a text box where I can input a word withing my sheet and when I press the Search button it highlights all the cells with the same search value in yellow. So far I have a text box (TextBox1), a Search button, and a reset button. I'm stock trying to attach the text box to the button's macro.
The macro attached to the Search button is the following:
Code:
Sub Macro1()
'
' Macro1 Macro
'
'
With Application.ReplaceFormant.Interior
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Cells.Replace What:="Paul", Replacement:="Paul", LookAt:=xlPart, _
SearchOrder:=xlByRows,
MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=True
End Sub
Any idea in how to have this macro look up the word within my text box instead of looking up a specific value such as "Paul"?