Private sub Command3_Click()
Dim xlapp As Excel.Application
Dim xlbook As Excel.workbook
Dim xlsheet As Excel.worksheet
Dim appexcel As Object
Set xlapp = CreateObject("excel.application")
' 设要处理的表为你那个带宏的表 ----- Test.xls
Set xlbook = xlapp.workbooks.open(App.Path & "\Test.xls")
xlapp.Visible = True '使你的表可见
xlapp.run "aa"
End sub
'经过测试,可以运行宏!
因为自定义宏所在的文件都没打开。