From: ordnance1 on 15 Apr 2010 16:23 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 15 Apr 2010 16:49 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
|
Pages: 1 Prev: Suppress Worksheet_SelectionChange conditionally Next: Copy and Paste using VBA. |