How can I use the task scheduler to run Excel Macro w. Windows 7? -
i know there other posts similar cannot seem work. want create .vbs file use scheduler kick off macro in excel on monthly basis. here have been trying:
option explicit dim xlapp dim xlbook set xlapp = createobject("excel.application") set xlbook = xlapp.workbooks.open("c:\test\test.xlsm", 0, true) xlapp.run "macro1" xlbook.close xlapp.quit set xlbook = nothing set xlapp = nothing wscript.quit
i warning message every time saying test.xlsm exists , want overwrite it. when click yes, changes never take effect.
i don't want message @ all, , don't know why changes macro not occurring.
i've tried use
xlapp.saveas
and cannot work either. plus workbook appears not closing correctly.
thanks in advance, new maybe missing stupid.
Comments
Post a Comment