johngalvin
10-03-2019, 11:34 PM
This is what I placed in 1.vbs, please note that the Macro is within a Module
Set objExcel = CreateObject("Excel.Application")
objExcel.Application.Run "'C:\Users\John\Documents\Folder\1\1.xlsm'!MacroinModule"
objExcel.DisplayAlerts = False
Set objExcel = Nothing
The .vbs runs, then I see at the Modified date that it updates to the time when the .vbs ran, but the macro doesen't work inside the .xlsm when the .vbs is running. The macro works just after opening Excel and pressing the "Run" Button
Any idea why?
Thanks
John
Set objExcel = CreateObject("Excel.Application")
objExcel.Application.Run "'C:\Users\John\Documents\Folder\1\1.xlsm'!MacroinModule"
objExcel.DisplayAlerts = False
Set objExcel = Nothing
The .vbs runs, then I see at the Modified date that it updates to the time when the .vbs ran, but the macro doesen't work inside the .xlsm when the .vbs is running. The macro works just after opening Excel and pressing the "Run" Button
Any idea why?
Thanks
John