Excel VBA: Late binding reference

[亡魂溺海] 提交于 2019-12-02 03:31:40

In answer to your question about late binding, this involves replacing the line of code

Dim Connection As ADODB.Connection

with

Dim Connection As object

and replacing

Set Connection = New ADODB.Connection

with

Set Connection = GetObject(, "ADODB.Connection")

And similarly for the other objects from that library.

Now, I am not sure if this will fix the actual issue that you are having. It sounds like there is a bug in the ActiveX library and you are hitting it, although nothing you are doing seems particularly esoteric.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!