问题描述
我需要通过计划任务在Excel电子表格中运行宏。
我已经定义了如下工作:
C:\Program Files\Microsoft Office\Office10\EXCEL.EXE
问题是,当作业启动时,Excel会弹出一个弹出窗口,并询问是否要禁用/启用这些阻止执行作业的宏。 / p>
如何无需手动点击启用宏即可运行此宏?
编写一个简短的vbscript,启动Excel,加载您的工作簿,并使用Application.Run运行宏。让你的计划任务运行vbscript。
例如:
I need to run a macro in an Excel spreadsheet through a schedule task.I've defined the job as below:
"C:\Program Files\Microsoft Office\Office10\EXCEL.EXE" ""
The problem is that when the job starts Excel displays a pop-up and asks if we want to disable/enable the macros, which blocks the execution of the job.
How can I run this macro without having to manually click on enable macro?
Write a short vbscript which launches Excel, loads your workbook and uses Application.Run to run the macro. Have your scheduled task run the vbscript.
Eg: http://www.mrexcel.com/forum/showthread.php?t=302970
这篇关于如何通过计划任务运行Excel宏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!