Ihave created a VBS script to open an Excel file. I need the script to run 2 macros that I have saved, one formats the worksheet and the other saves the file as a .csv file.
I have the following script, but I am getting a runtime error on line 8:
Dim objExcel
Dim objWorkbook
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
set objWorkbook = objExcel.Workbooks.Open("C:\Users\Desktop\SRI\SRI_Import.xlsx")
objExcel.run "'PERSONAL.XLSB'!SRIStudent"
objExcel.Ontime Now, "PERSONAL.XLSB!SRIStudentSave"
objWorkbook.Close true
objExcel.Quit
Set objWorkbook = Nothing
Set objExcel = Nothing


Reply With Quote
.
