Results 1 to 3 of 3

[SOLVED] Macro that grabs data from table

Threaded View

  1. #1
    Registered User
    Join Date
    05-14-2015
    Location
    Atlanta GA
    MS-Off Ver
    2007
    Posts
    16

    [SOLVED] Macro that grabs data from table

    I am trying to grab the Item specific data (color, model, mileage, year) from a group of links pasted in the A column (example http://www.ebay.com/itm/Harley-David...m=181746283957), and place the data in subsequent columns. This is what I have so far, but I get an error box "438: Object doesn't support this property or method". I have no idea what this means and what is wrong with my code?? Thanks!!
    Sub LinkGrab()
    Dim Ie As New InternetExplorer
    Dim WebURL
    Dim Docx As HTMLDocument
    Dim Make
    Dim Model
    Dim Mileage
    Dim vin
    Dim Year
    Dim Esize
    Dim Color
    
    Ie.Visible = False
    
    For RcdNum = 2 To ThisWorkbook.Worksheets(1).Range(ThisRange).End(xlUp).Row
    
    WebURL = ThisWorkbook.Worksheets(1).Range("A" & RcdNum)
    Ie.Navigate2 WebURL
    Do Until Ie.readyState = READYSTATE_COMPLETE
    DoEvents
    Loop
    Set Docx = Ie.document
    Set Container = Docx.getElementsById("readMoreDesc")
    Info = Container.Children
    If Info.className = "attrLabels" Then
        If Info.attrLabels = "VIN (Vehicle Identification Number)" Then
          vin = Info.attrLabels.getElementsByTagName("span")(0).innerText
        ElseIf Info.attrLabels = "Year" Then
          Year = Info.attrLabels.getElementsByTagName("span")(0).innerText
        ElseIf Info.attrLabels = "Make" Then
          Make = Info.attrLabels.getElementsByTagName("span")(0).innerText
        ElseIf Info.attrLabels = "Engine Size (cc)" Then
          Esize = Info.attrLabels.getElementsByTagName("span")(0).innerText
        ElseIf Info.attrLabels = "Model" Then
          Model = Info.attrLabels.getElementsByTagName("span")(0).innerText
        ElseIf Info.attrLabels = "Mileage" Then
          Mileage = Info.attrLabels.getElementsByTagName("span")(0).innerText
        ElseIf Info.attrLabels = "Color" Then
          Color = Info.attrLabels.getElementsByTagName("span")(0).innerText
        End If
    End If
        
          
         
        
    
    ThisWorkbook.Worksheets(1).Range("B" & RcdNum) = Year
    ThisWorkbook.Worksheets(1).Range("C" & RcdNum) = Color
    ThisWorkbook.Worksheets(1).Range("D" & RcdNum) = Make
    ThisWorkbook.Worksheets(1).Range("E" & RcdNum) = Model
    ThisWorkbook.Worksheets(1).Range("F" & RcdNum) = Mileage
    ThisWorkbook.Worksheets(1).Range("G" & RcdNum) = vin
    ThisWorkbook.Worksheets(1).Range("H" & RcdNum) = Esize
    Next
    
    End Sub
    Last edited by gautum123; 05-22-2015 at 11:53 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 04-10-2015, 04:34 PM
  2. Bloomberg Grabs using primo PDF
    By akshay8530 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2014, 12:01 PM
  3. Replies: 1
    Last Post: 01-01-2014, 09:53 AM
  4. Almost done, Macro grabs excel cells copies to word
    By DadaaP in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 05-31-2013, 02:08 AM
  5. write formula that grabs data from last column
    By marlowisws in forum Excel General
    Replies: 0
    Last Post: 08-04-2006, 12:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1