以下是我的情景:
Button_ClickClear
我尝试了以下内容:
Windows("DR Calculator.xlsm").Activate
Run Macro:="C:\Users\rchun1\Documents\Demand\DR Calculator\'DR Calculator.xlsm'!Button5_ClickClear"
我收到以下错误:
Cannot run the macro 'C:\Users\rchun1\Documents\Demand\DR Calculator\'DR Calculator.xlsm'!Button5_ClickClear'.
The macro may not be available in this workbook or all macros may be disabled.
我已经通过弄乱信任中心并尝试搞乱工具中的引用来启用所有Excel文件中的所有宏。
我尝试的来源: http://answers.microsoft.com/en-us/office/forum/office_2003-customize/how-do-i-call-a-procedure-from-a-module-in-a/5e8645a6-3739-4fcc-be13-52e216f7961f?auth=1 http://www.ozgrid.com/forum/showthread.php?t=80137
谢谢, 莱恩
答案 0 :(得分:1)
尝试
Application.Run "'DR Calculator.xlsm'!Button5_ClickClear"