Code:
Sub MacroRun()
Dim file
Dim path As String
path = "C:\Users\Desktop\TEST\"
file = Dir(path & "*.xlsm")
Do While file <> ""
Documents.Open Filename:=path & file
Call Format
ActiveDocument.Save
ActiveDocument.Close
file = Dir()
Loop
End Sub
This is my code for running a macro for entire excel files in a folder, and Format is the macro that I want to call. It seems correct, but macro does not work at all. Is there any mistake that I made?
Thank you!
Last edited: