Thanks in advance for any help or guidance. I have a vbscript, pasted below, that opens excel, runs a macro but fails to save and close.
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open(“M:\Test\Test.csv”)
objExcel.Application.Visible = True
objExcel.Application.Run "PERSONAL.XLSB!Macro1"
objExcel.ActiveWorkbook.Close
'objWorkbook.SaveAs(“M:\Test\Test.csv”)
objExcel.Application.Quit
WScript.Quit
I've commented out the objWorkbookSaveAs because it pops up an invalid charater in line 10 - char 20. Is it because it is located on a network drive? I can manually save the file.
Thank you
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.