I have a macro that runs a series of other macros. The macro runs automatically when I change the value of a specific cell (B1). The macro generates a project report for the project number specified in B1. I have about 75 active projects at any given time.
What I'd like to do is add the list of projects to the workbook and have it run through the each value. The values and number of values change each week, so I don't want to hard code the values into the macro. I'm assuming I'd use the loop function, but not certain how to go about it.
My code for the current macro is:
Sub AA_RunAll()
Application.ScreenUpdating = False
ActiveWorkbook.RefreshAll
DoEvents
Call OpenFile
Call Copy1
Call DeleteRows1
Call DeleteRows2
Call DetailCopy
Call RemoveEmptySheets
Call SummarySheet
Workbooks("Project WIP Template.xlsm").Worksheets("Summary").Activate
Application.Goto Range("A1"), True
Application.ScreenUpdating = True
Application.DisplayAlerts = True
Call SaveAs
Workbooks("Project WIP V5.xlsm").Worksheets("Summary").Activate
Range("b1").Select
MsgBox "Report Complete"
End Sub
Thanks in advance
DetailCopyetc.) supposed to get these unspecified "values" that your question alludes to? You seem to know that you need some sort of loop. Given the lack of details it is hard to say anything more than that. Perhaps you need to rewrite your macros so that they take parameters, then call the macros in a loop, passing them the values one by one.