Function displayAllDll() Dim r As Reference On Error Resume Next For Each r In References Debug.Print "类库名:" & r.name Debug.Print "类库文件绝对路径:" & r.FullPath Debug.Print "是否内建:" & r.BuiltIn Debug.Print "类库版本号" & r.Minor Next End Function
得到类库名后你可以直接使用“后引用”的方式来建立需要的对象,比如 Dim rs Set rs = CreateObject("adodb.recordset")