- 帖子
- 2035
- 主題
- 24
- 精華
- 0
- 積分
- 2031
- 點名
- 0
- 作業系統
- Win7
- 軟體版本
- Office2010
- 閱讀權限
- 100
- 性別
- 男
- 註冊時間
- 2012-3-22
- 最後登錄
- 2024-2-1
|
9#
發表於 2013-10-19 14:38
| 只看該作者
回復 7# icestormer
為方便閱覽,特將它翻譯如下:- Actually it's a member of msforms library, not from native vba.
- (確實它是微軟表單程式庫的乙員,而非 VBA 的生成元件)
- you can use it without a userform but you'll need a reference
- to Microsoft Forms Object Library. The reference is automatically added
- to a workbook when you insert a Userform from VBeditor's Insert menu.
- (你可以不需表單而去使用它,但是你還是須要參考到微軟的表單物件程式庫。
- 當你從VB編輯插入選單內插入一張表單時,此參考項會自動加入到活頁簿裡。)
- Problem (問題)
- An Excel VBA subroutine that involves interaction with the Windows Clipboard fails to run with the error:
- “Compile error: User-defined type not defined.” The line of code highlighted by Excel as
- being the cause of the error includes a reference to the “DataObject” object type.
- (當一個試算表 VBA 程式段內涵蓋視窗剪貼簿之鏈結於執行時產生錯誤:"程式編輯錯誤:使用者自訂型態尚未定義"。
- 反白標示發生錯誤的這行是在說明它在參照 "資料物件 (“DataObject”)" 時發生了參照錯誤。)
- Solution (解決方案)
- (Tested on my machine with Excel 2003 SP3) (已經在Excel 2003 SP3測試過)
- In the Microsoft Visual Basic editor: (在微軟的 VB 編輯器內)
- Stop debugging by clicking the “Stop” button on the toolbar (if debugging isn't already stopped).
- (停止偵錯模式,即選按工作列上的 "停止" 鈕終止偵錯)
- Tools menu | References (工具菜單 | 參考項目 )
- In the list of available references, find “Microsoft Forms 2.0 Object Library”, check it, and click OK.
- 在參考列示項目選單內,找尋“Microsoft Forms 2.0 Object Library”,找到後點選它就完成了。
- (For me, this was the 2nd unchecked item from the top of the list; it wasn't sorted alphabetically
- in the list like most of the rest of the listed items.)
- Run the macro again. (再重新執行巨集)
- That's it! Hope this helps! (就這樣! 希望對你有所幫助!)
複製代碼 |
|