S
septimus
So I've got this code to perform a find-and-replace in an Excel
workbook:
Cells.Replace What:="This", Replacement:="That", _
LookAt:=xlPart, SearchOrder:=xlByColumns, _
MatchCase:=False, SearchFormat:=False,
ReplaceFormat:=False
Works fine, except that in order to have it perform the find-and-
replace on all worksheets in the workbook, I have to type CTRL-H and
change the "Within" property from "Sheet" to "Workbook". The next time
I open Excel, that property is automatically changed back to "Sheet."
Is there a way to set the "Within" property for find-and-replace in
VBA?
Thanks!
workbook:
Cells.Replace What:="This", Replacement:="That", _
LookAt:=xlPart, SearchOrder:=xlByColumns, _
MatchCase:=False, SearchFormat:=False,
ReplaceFormat:=False
Works fine, except that in order to have it perform the find-and-
replace on all worksheets in the workbook, I have to type CTRL-H and
change the "Within" property from "Sheet" to "Workbook". The next time
I open Excel, that property is automatically changed back to "Sheet."
Is there a way to set the "Within" property for find-and-replace in
VBA?
Thanks!