I am trying to “reach into” multiple excel files and change the worksheet to a common name (i.e. “data”). I want to automate this process so that it can be executed from one excel file and runs as a loop until all files in a target directory have been changed. I can do this in a macro that will affect one file at a time but would like to modify to run as a loop. All files have only one sheet so I don’t think I need to select the ActiveSheet.
Dim CWB As Workbook
Dim DWB As Workbook
Set CWB = ActiveWorkbook
DestinationBook = Application.GetOpenFilename(“All Excel Files, *.xls”)
Workbooks.Open DestinationBook
Set DWB = ActiveWorkbook
CWB.Activate
Sheets(“exc56”).Select
Sheets(“exc56”).Name = “data”
Thanks in advance,
Bill