And quick rules or tricks for recieving duplicate Classes off and Html page??
Does anyone know how to skip a class? or get all classes with the same class names into cells A B and C??
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>
MY CODE ( part of )
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
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 "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
is it +1 or (1) or after each??
Anyone whos found a tutorial for handling this too would be great for this thread. Thanks.
Re: And quick rules or tricks for recieving duplicate Classes off and Html page??
without having seen the web page, i would be looking at working through each row in the table