Hello,
I have a folder that contains multiple CSV files and I have 2 macros in a excel file that needs to be run.
First, I want to run those 2 macros on all the CSV files and then save it as Excel file. I am trying a VBscript from below but it is throwing an error that it could not find the macro excel file.
Please assist
Option Explicit
LaunchMacro
Sub LaunchMacro()
Dim xl
Dim xlBook
Set xl = CreateObject("Excel.application")
Set xlBook = xl.Workbooks.Open("C:\TEST\CASE_FILING_BASIS_23-MAR-16", 0, False)
xl.Application.Visible = True
xl.Application.run "Highlight_Results_Macro"
xl.DisplayAlerts = False
xlBook.saved = True
xl.activewindow.close
xl.Quit
Set xlBook = Nothing
Set xl = Nothing
End Sub
Open in new window