I am attempting to run this script
if WScript.Arguments.Count < 1 Then
WScript.Echo "Drop file on to me to process."
Wscript.QuitEnd If
Set oExcel = CreateObject("Excel.Application")
Set oBook = oExcel.Workbooks.Open(Wscript.Arguments.Item(0))
Set oVBC = oBook.VBProject.VBComponents oVBC.Import("C:\Test\Test.bas")
oBook.Application.Run "Test"
WScript.Echo "Done"
The name of the macro inside of the Test.bas file is Test() and the file is located at C:\Test\Test.bas - now anytime I try to drag a .xlsx file on top of the .vbscript I get an error that reads
Syntax error
800A03EA
Microsoft VBScript Compilation error
What needs to be altered in this script to remedy that issue?