I have multiple excel workbooks each representing a days data, each workbook has multiple sheets representing each event on the day..
i need to run 6 macros in order across each sheet in a workbook and then move on to the next workbook (all the workbooks are in the same folder on the desktop)
at the moment im using this (below) to run the macros in order across all the sheets but im having trouble trying to get somthing to run across all of the workbooks
Sub RUN_FILL()
Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets
sh.Activate
Call macro_1
Call macro_2
Call macro_3
Call macro_4
Call macro_5
Call macro_6
Next sh
End Sub
any idea how i might do this ?
I do not have your macros so I have created dummy macros that output some values to the Immediate window for every sheet of every workbook (except the workbook containing the macro).
You code appears to depend on the output macro activating each worksheet. This is bad practice. I pass the workbook and the worksheet name to the the macros. I output the value of cell A1 (
.Cells(1, 1).Value) to show how it is done.I hope this is enough to get you started. Ask if anything is unclear.