+ Reply to Thread
Results 1 to 2 of 2

VBA syntax error on extracting loop

  1. #1
    Registered User
    Join Date
    06-11-2013
    Location
    Bulgaria
    MS-Off Ver
    Excel 2003
    Posts
    7

    VBA syntax error on extracting loop

    Hello I am using the following function to extact information from a site,

    Dim tbl, trs, tr, tds, td, r, c

    Set tbl = Doc.getElementsByTagName("table")(0)
    Set trs = tbl.getElementsByTagName("tr")

    For r = 1 To trs.Count
    Set tds = trs(r).getElementsByTagName("td")
    For c = 1 To tds.Count
    ActiveSheet.Cells(r, c).Value = tds(c).innerText
    Next c
    Next r


    but when executed I am getting an error : Object doesn't support this property or method on the following line: For r = 1 To trs.Count

    anyone can help ?

  2. #2
    Registered User
    Join Date
    06-11-2013
    Location
    Bulgaria
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: VBA syntax error on extracting loop

    Here is the whole code that I am using:


    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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