Have excel workbook with functioning macro that works perfectly. Want to use vb script to execute macro without having to open the workbook, then use bat file to launch script using Win Scheduler. Very simple but worn't run, meaning batch file starts but nothing happens after, just a flash on the screen. Hope this is the right forum, if not my apologies.
VB script file (SDMacroScript.vbs) language:
help!
VB script file (SDMacroScript.vbs) language:
Code:
Dim args, objExcel
Set args = wScript.Arguments
Set objExcel = CreateObject("Excel.Application")
objExcel.workbooks.Open args(0)
objExcel.visible = False
objExcel.Run "StrmDig_Macro_ReOcrnc.xlsm!StrmDigPrcs.StrmDigPrcs"
objExcel.Activeworkbook.Close(0)
objExcel.Quit
bach file:
----------------
cscript SDMacroScript.vbs "E:\Main BE\StrmDig_Macro_ReOcrnc.xlms"
Last edited by a moderator: