标题: childobjects方法得到的对象集合的顺序可能不是按照页面上从上到下的顺序排列的 [打印本页] 作者: FLY000 时间: 2010-9-16 16:21 标题: childobjects方法得到的对象集合的顺序可能不是按照页面上从上到下的顺序排列的 Function GetCalculateNode()
Dim i
i = 1
Set PlusCollection = GetPlusCollection()
NumberOfPlus = PlusCollection.Count
Do
LastNum = GetReportNum()
minusNum = GetMinusNum()
CurrentCnt = unClickPlusNum + minusNum
TxtOfPlus= GetTxt(i)
If InStr(1,UnExpandNodeNameList,TxtOfPlus,1)=0 Then
PlusCollection(unClickPlusNum).Click
CurrentNum = GetReportNum()
If CurrentNum>LastNum Then
Call CalculateReports(LastNum,CurrentNum)
i = i + CurrentNum-LastNum
End If
else
unClickPlusNum = unClickPlusNum + 1
End If
Set PlusCollection = GetPlusCollection()
NumberOfPlus = PlusCollection.Count
i = i +1
Loop Until CurrentCnt = NumberOfPlus
End Function