I have one issue with one excel VBA, the file it works good collecting data from other open workbook, but, when I use VBScript to open the excel file, when I run the macro in the excel file to collect data from other open workbook, give error "subscript out of range" Can anyone help me?
Do I have to introduce any code in VBS to allow the excel file interact with other open workbooks?
The main reason I use VBS to open the excel file is, because I have a Form and when is open, still alow me to work in other excel files.
Option Explicit
Dim obj, xlBook, Shell
Set obj = CreateObject("Excel.Application")
obj.DisplayAlerts = False
Set xlBook = obj.Workbooks.Open("C:\excel.xlsm", , False)
WScript.Quit