Call AccessibleObjectFromWindow(hwnd, OBJID_CLIENT, IID_IAccessible, lngTMP)
If lngTMP Is Nothing Then Exit Sub
lngCount = lngTMP.accChildCount
If lngCount = 0 Then Exit Sub
ReDim accChildren(lngCount)
Call AccessibleChildren(lngTMP, 0, lngCount, accChildren(0), lngTMP2)
如何得到accChildren(0)的孩子们?debug.print lngTMP2 和 accChildren(0).accChildCount 的值都是7,但是 debug.print accChildren(0).Child(1).accName(CHILDID_SELF) 会报错 “object variable or with block variable not set”。为什么?
If lngTMP Is Nothing Then Exit Sub
lngCount = lngTMP.accChildCount
If lngCount = 0 Then Exit Sub
ReDim accChildren(lngCount)
Call AccessibleChildren(lngTMP, 0, lngCount, accChildren(0), lngTMP2)
如何得到accChildren(0)的孩子们?debug.print lngTMP2 和 accChildren(0).accChildCount 的值都是7,但是 debug.print accChildren(0).Child(1).accName(CHILDID_SELF) 会报错 “object variable or with block variable not set”。为什么?
这是典型的数据库连接字符串出问题