找回密码
 加入
搜索
查看: 1738|回复: 0

[AU3基础] 运行某个EXCEL加载宏用怎样的代码?

[复制链接]
发表于 2012-8-19 17:53:33 | 显示全部楼层 |阅读模式
想运行某个EXCEL加载宏
找到这篇文章http://www.autoitx.com/viewthrea ... t=%BA%EA&page=1
与这篇文单不同的是我要运行的是加载宏
以下代码也没有报错 但实际没有运行
请指点
谢谢先
#include <Excel.au3>
Opt('TrayMenuMode', 1) ;单击不暂停
Opt("WinTitleMatchMode", 2)
Opt("SendKeyDelay", 200)
WinActivate("Microsoft Excel ","")
$oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
$oExcel =_ExcelBookAttach("C:\Documents and Settings\Administrator\Application Data\Microsoft\AddIns\cspro.xlam")
If @error Then
    ConsoleWrite("Error opening Excel Workbook" & @CR)
    Exit
EndIf
_ExcelMacroRun($oExcel, "deal_jzt_text")
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-20 11:34 , Processed in 0.089928 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表