Does anyone know how to skip a class? or get all classes with the same class names into cells A B and C??
MY CODE ( part of )Code:<tr> <td class="headline txtBlue size15"> Model </td> <td style="width:10px"> </td> <td class="txtGrey size15"> Ford </td> <td> </td> <td class="headline txtBlue size15"> Year </td> <td class="txtGrey size15"> 1967 </td> </tr> <tr> <td class="headline txtBlue size15"> Colour </td> <td style="width:10px"> </td> <td class="txtGrey size15"> Red </td> <td> </td>
WHAT I REALLY WANT..Code:With objIE .Visible = False .navigate "http://www.sample.com/view.aspx?vehicle_id=F00293G" Do While .Busy Or _ .readyState <> 4 DoEvents Loop For Each ele In .document.all Select Case ele.classname Case "Result" RowCount = RowCount + 1 Case "headline txtBlue size28" sht.Range("A" & RowCount) = ele.innertext Case "txtGrey size15" sht.Range("B" & RowCount) = ele.innertext Case "Location" sht.Range("C" & RowCount) = ele.innertext Case "Description" sht.Range("D" & RowCount) = ele.innertext End Select Next ele
is it +1 or (1) or after each??Code:With objIE .Visible = False .navigate "http://www.sample.com/view.aspx?vehicle_id=F00293G" Do While .Busy Or _ .readyState <> 4 DoEvents Loop For Each ele In .document.all Select Case ele.classname Case "Result" RowCount = RowCount + 1 Case "txtGrey size15" '1ST ENTRY SAME VEHICLE FORD sht.Range("A" & RowCount) = ele.innertext Case "txtGrey size15" '2ND ENTRY SAME VEHICLE 1967 sht.Range("B" & RowCount) = ele.innertext Case "txtGrey size15" '3RD ENTRY SAME VEHICLE RED sht.Range("C" & RowCount) = ele.innertext Case "txtGrey size15" '4TH ENTRY SAME VEHICLE AUTOMATIC sht.Range("D" & RowCount) = ele.innertext End Select Next ele
Anyone whos found a tutorial for handling this too would be great for this thread. Thanks.


Reply With Quote
