So I’ve created a simple Macro to:
- un-hide a worksheet.
- find and replace text.
- re-hide the worksheet.
I have this macro working, but can only get it to work when I embed the macro code into a worksheet.
Here is the code;
Sub UpdateChartParams()
Dim Chart_Parameters As Worksheet
Sheets("Chart_Parameters").Visible = True
Sheets("Chart_Parameters").Select
Cells.Replace What:="testtext", Replacement:="newtext", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Sheets("Chart_Parameters").Visible = False
End Sub
What I need to do is run this file against any open workbooks if possible.
This will update any open workbook(s) with a matching sheet.
No need to unhide to run the replace.