From: ordnance1 on
Is there any way to make the What:="" be a variable? So if the variable =
Test then the replace code would look for Test.



Cells.Replace What:="", Replacement:="", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

From: JLGWhiz on
x = Test
sh.Cells.Replace(What:=x,....

Don't use quote marks on variables.

"ordnance1" <ordnance1(a)comcast.net> wrote in message
news:6DF8BCD6-440C-4443-88D6-99E7D4D2C389(a)microsoft.com...
> Is there any way to make the What:="" be a variable? So if the variable =
> Test then the replace code would look for Test.
>
>
>
> Cells.Replace What:="", Replacement:="", LookAt:=xlWhole, _
> SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
> ReplaceFormat:=False