06-04-2010, 01:33 PM
you have changed the loop variable to 'j' for second For loop, but did not change it at other placed where you have used. all are still 'i'
changed the second loop as below -
put your codes using proper formatting tags to make it more readable
changed the second loop as below -
Code:
For j = 1 To CountOfRows
'a=Browser("Untitled Page").Page("Untitled Page_3").WebTable("Data_Table").GetCellData(j,1)
CustomerName=Browser("Meghalaya Directory Search").Page("Meghalaya Directory Search_3").WebTable("DataTable").WebTable("Table").GetCellData(j,3)
Address=Browser("Meghalaya Directory Search").Page("Meghalaya Directory Search_3").WebTable("DataTable").WebTable("Table").GetCellData(j,4)
nRow = nRow + 1
xlSheet.Rows(nRow).Columns(1).Value =CustomerName
xlSheet.Rows(nRow).Columns(2).Value =Address
Next
put your codes using proper formatting tags to make it more readable