I have a complex Macro that I'd like to run on every file within a folder. The Looped Macro should end once every file has been modified.
I have modified some code found on this site, but it does not open any files within the folder. Do I need another "open" command for each file?
Sub LoopThroughFolder()
Dim StrFile As String
StrFile = Dir("C:\Users\Sample Folder\")
Do While Len(StrFile) > 0
Application.Run "'FX Regression Model.xlsm'!CalculateWeighting"
StrFile = Dir
Loop
End Sub
Any advice would be greatly appreciated. Thank you!