
04202012
By: a guest on
Apr 20th, 2012 | syntax:
VB.NET | size: 1.22 KB | hits: 24 | expires: Never
Sub selectSize(wsname,objnum)
Dim tableInxnum as Integer
Dim inxpoolnum as Integer
Dim parentInxnum as Integer
Dim parentInx() as Variant
Dim selectList() as Variant
Dim selectnum as Integer
tableindexnum=1
selectnum=3
parentInxnum=7
inxpoolnum=10
'Copy tableinx to pumpinx
parentInx=listcolfromtable(wsname,objnum,tableInxnum)
Call writeArrayColTable(wsname,objnum,parentInxnum,parentInx)
'Get selection list
selectList=listcolfromtable(wsname,objnum,selectnum)
'copy parent index to index pool
Call writeArrayColTable(wsname,objnum,inxpoolnum,parentInx)
End Sub
Function inxChildList(wsname,objnum,tableInxnum,selectionnum,selection,parentinx)
Dim children() as Variant
Dim selectList() as Variant
Dim tableInx() as Variant
Dim count as Integer
selectList=listcolfromtable(wsname,objnum,selectionnum)
tableInx=listcolfromtable(wsname,objum,tableInxnum)
'Can get a better way to find index length directly from object property
Redim children(1 to Ubound(selectList))
For i=1 to Ubound(tableInx)
If findinlist(parentinx,i)=1 Then
If selection=selectList(i) Then
count=count+1
children(count)=selecList(i)
End If
End If
Next i
inxChildList=children
End Function