macro apply to all worksheet
For intSheet = 1 To ActiveWorkbook.Sheets.Count
Sub Macro()
With ActiveWorkbook.Sheets(intSheet)
'Place you code here
..Cells.Replace What:="jacob", Replacement:="jac" _
, LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat _
:=False, ReplaceFormat:=False
End With
Next
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"AskExcel" wrote:
hi,
i have a simple macro to do find and replace but only on the sheet that i
open.
may i know how to make this macro to change all sheets if found the same
string in the workbook?
sub macro()
Cells.Replace What:="C:\xxx\xxx\xxx\", Replacement:="C:\yyy\yyy\yyy\" _
, LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat _
:=False, ReplaceFormat:=False
end sub
thanks
|