看板 Office 關於我們 聯絡資訊
各位大大好 問題:如何使用a.xls裡面的b 巨集啟動 c.xls 檔案裡面的d巨集? 描述: 小弟在a.xls中寫了一個b巨集想要自動開啟c.xls檔案,且自動執行c.xls裡面的d 巨集 。 可是程式碼跑到要執行d巨集時,就發生錯誤… 請問各位大大,這個有解法嗎? 懇請指教 以下為圖片說明 a.xls 裡面的b巨集 http://i.imgur.com/wUsMVVY.jpg c.xls 裡面的d巨集 http://i.imgur.com/Rdb91NL.jpg 執行後產生錯誤 http://i.imgur.com/1gEMSsm.jpg -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.41.16.151 ※ 文章網址: https://www.ptt.cc/bbs/Office/M.1500124084.A.3A0.html ※ 編輯: thomasflee (114.41.16.151), 07/15/2017 21:09:02
soyoso: 執行上是以application.run嗎?如果是的話如何寫?07/15 21:21
soyoso: 提供檔案應會比較清楚07/15 21:22
※ 編輯: thomasflee (114.41.16.151), 07/15/2017 21:37:27
thomasflee: 好的,馬上補上 07/15 21:38
soyoso: "d"改為"c.xls!d"試試 07/15 22:23
thomasflee: 好的,等會來測試看看 07/15 23:09
thomasflee: 可以了,感謝s大!! 07/15 23:15
foolkids: Application.Run "sub名稱", 參數1 ,參數2 ,... 07/16 10:00
foolkids: 推錯篇… 07/16 10:00