看板 Office 關於我們 聯絡資訊
軟體: 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版本的關係呢? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.227.107.9 ※ 文章網址: https://www.ptt.cc/bbs/Office/M.1482203940.A.675.html
Linkey: https://goo.gl/bjOHwu 參考一下 12/20 12:13
Gitangan: 這個.DLL檔沒有遺失 12/20 13:13