This is what I have done, obviously wrong, can you show
me forward again please?
Sub ReplaceItems()
Dim sh As Worksheet
Dim str As String
sStr = InputBox("L2")
sStr1 = InputBox("A2")
Application.DisplayAlerts = False
(Array(("Week1", "Week2", "Week3", Week4"))
sh.Cells.Replace What:=sStr, Replacement:=sStr1, _
LookAt:=xlPart, SearchOrder:=xlByRows,
MatchCase:=False
Next
Application.DisplayAlerts = True
End Sub
-----Original Message-----
Sub ReplaceItems()
Dim sh As Worksheet
Dim str As String
sStr = InputBox("enter item to be replaced")
sStr1 = InputBox("enter replacement")
Application.displayalerts = False
For Each sh In Worksheets(Array
("sheet1", "sheet2", . . . , _
"sheet9","sheet10"))
sh.Cells.Replace What:=sStr, Replacement:=sStr1, _
LookAt:=xlPart, SearchOrder:=xlByRows,
MatchCase:=False
Next
Application.displayalerts = True
End Sub
replace ... with the list of additional sheet names.
--
Regards,
Tom Ogilvy
Tony wrote in message
...
Hi
Am not hot on VB and am stuck. Have recorded a macro
which uses text written into a box, running the macro
to
run a mass replace job over 10 sheets. When I do this,
everything works apart from the macro always replaces
what was originally in the box rather than whatever is
typed. How do I change this constant into a variable
copy/paste? Please keep it simple if you can help!!!
Thank you for any help you can give
Tony
.