The below function finds a table and sets the control to the table using the index.
Public Function func_Find_Table_Index_Variable(objTable,introw,intcol,sCel_1_1_value,intStartIndex,blnExactMatch)
Table_Index = intStartIndex
cel_value = ""
sCel_1_1_value=Trim(sCel_1_1_value)
objTable.SetTOProperty "index", Table_Index
Do
If objTable.Exist(0) =False Then
Exit Do
End If
cel_value = Trim(objTable.GetCellData(introw,intcol))
Table_Index = Table_Index+1
objTable.SetTOProperty "Index", Table_Index
If objTable.Exist(0) =False Then
Exit Do
End If
If (blnExactMatch=False and Instr(Ucase(cel_value),ucase(sCel_1_1_value))>0 ) Or (blnExactMatch=True and Ucase(cel_value)=Ucase(sCel_1_1_value) ) Then
Exit Do
End If
Loop
If (blnExactMatch=False and Instr(Ucase(cel_value),ucase(sCel_1_1_value))>0 )Or blnExactMatch=True and Ucase(cel_value)=Ucase(sCel_1_1_value)Then
objTable.SetTOProperty "index", Table_Index-1
func_Find_Table_Index_Variable = Table_Index-1
Exit Function
End If
func_Find_Table_Index_Variable = False
End Function