Results 1 to 2 of 2

Thread: And quick rules or tricks for recieving duplicate Classes off and Html page??

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2006
    Posts
    57

    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">
    						&nbsp;
    					</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">
    						&nbsp;
    					</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.
    Last edited by 0o0o0; Feb 3rd, 2013 at 03:57 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width