I'm not sure if I did it correctly.
But when I run my test nth happen..
here's my code..
(my table row default value is 1)
I dunno where is the problem..
But when I run my test nth happen..
here's my code..
(my table row default value is 1)
I dunno where is the problem..
Code:
nTotalRow = Browser("bwTPeSA").Page("bwTPeSA.pgMySub").WebTable("bwTPeSA.mySub.tblSubjects").RowCount
MsgBox nTotalRow
Function ComapreTableElement(nTotalRow)
If (nTotalRow = 1 Or nTotalRow = 2) Then
blnStatus = False
End If
For intItemCntx = 2 To nTotalRow
strGetVal1 =Browser("bwTPeSA").Page("bwTPeSA.pgMySub").WebTable("bwTPeSA.mySub.tblSubjects").GetCellData(intItemCntx, 4)
For intItemCnty = intItemCntx + 1 To nTotalRow
strGetVal2 = Browser("bwTPeSA").Page("bwTPeSA.pgMySub").WebTable("bwTPeSA.mySub.tblSubjects").GetCellData(intItemCnty, 4)
If (StrComp(strGetVal1, strGetVal2, VbTextCompare) = 0) Then
blnStatus = False
MsgBox "No Duplicate"
Exit For
Else
blnStatus = True
MsgBox"Duplicate"
End If
Next
If (blnStatus = False) Then
Exit For
End If
Next
ComapreTableElement = blnStatus
End Function