[問題] VBA 錯誤429 ActiveX元件無法產生物件

作者: Gitangan (大貓)   2016-12-20 11:18:56
軟體: Excel
版本: Office 2013 Professional
透過VBA在Excel連接Web Service讀取SQL Server
這些檔案之後是用Office 2003製作,現在換Office 2013使用
主要的code寫在module,有一個自動產生的class
[按鈕] 執行後出現 "ActiveX 元件無法產生物件"
http://imgur.com/a/1n8At
Google上的方法+重新安裝Office 2013,試了好幾天找不到解決方法
以下是錯誤偵錯停留之位置
→Module內容:
Private oSOAP As New cls_wbservice
...
Sub TEST()
Dim xmlDoc As MSXML2.IXMLDOMNodeList
Set xmlDoc = oSOAP.wsm_pro(YYMMDD)
...
End Sub
→Class內容:
Private sc_Service1 As New SoapClient30
Private Const c_WSDL_URL As String = "http://...../Service1.asmx?WSDL"
Private Const c_SERVICE As String = "Service1"
Private Const c_PORT As String = "Service1Soap"
Private Const c_SERVICE_NAMESPACE As String = "http://tempuri.org/"
Private Sub Class_Initialize()
...
End Sub
錯誤就停留在 Set xmlDoc = oSOAP.wsm_pro(YYMMDD)
看起來是無法產生oSOAP這個物件,用CreateObject("")也不行
請問板友有沒有遇過這個問題?還是Office版本的關係呢?
謝謝
作者: Linkey (Linkey)   2016-12-20 12:13:00
作者: Gitangan (大貓)   2016-12-20 13:13:00
這個.DLL檔沒有遺失

Links booklink

Contact Us: admin [ a t ] ucptt.com