What i am trying to do is open all the excel files in a folder and run the macro in each file one by one.
i am stuck here. Need a code to run a macro without mentioning the file name.
Sub AllFiles() Dim folderPath As String
Dim filename As String
Dim wb As Workbook
folderPath = ThisWorkbook.Sheets("SHeet1").Range("D2").Value
If Right(folderPath, 1) <> "\" Then folderPath = folderPath + "\"
filename = Dir(folderPath & "*.xlsm")
Do While filename <> ""
Application.ScreenUpdating = False
Set wb = Workbooks.Open(folderPath & filename)
Application.Run "Committee_Tag"
filename = Dir
Loop
Application.ScreenUpdating = True
End Sub