Results 1 to 2 of 2

Object does not support this property of method, while parsing html documnent

Threaded View

  1. #1
    Registered User
    Join Date
    11-21-2014
    Location
    bangladesh
    MS-Off Ver
    2013
    Posts
    33

    Angry Object does not support this property of method, while parsing html documnent

    I want to scrape every post heading from this blog. I am using the code below but it's giving me an error "Run time error 438 object does not support this property or method" in line
    Cells(i, 1).Value = ele.getElementsByClassName("entry-title")(0).getElementsByTagName("a")(0).innerText
    Private Sub CommandButton1_Click()
    
    Dim bot As Object
    Dim doc As New HTMLDocument
    Dim ele As HTMLElementCollection
    Dim i As Long
    
    Set bot = CreateObject("MSXML2.XMLHTTP")
    bot.Open "GET", "http://themakeupblogger.com/makeup/", False
    bot.send
    doc.body.innerHTML = bot.responseText
    
    For Each ele In doc.getElementsByTagName("article")
    i = Cells(Rows.Count, 1).End(xlUp).Row + 1
    
      Cells(i, 1).Value = ele.getElementsByClassName("entry-title")(0).getElementsByTagName("a")(0).innerText
      
    Next ele
    End Sub
    Last edited by Atik; 11-28-2017 at 08:33 AM. Reason: fixed spelling mistakes that affect meaning

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Object doesn't support this property or method - word object
    By Yakov on Excel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-27-2017, 09:46 AM
  2. Object doesnt support this property or method
    By dlister in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2015, 05:32 AM
  3. Object doesn't support this property or method
    By Apple1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2014, 12:09 AM
  4. object doesnt support this property or method
    By bsapaka in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-11-2014, 02:19 PM
  5. object doesn't support this property or method
    By teowchy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2013, 03:16 AM
  6. Object does not support this property or method
    By Japi_s in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-18-2007, 02:41 AM
  7. [SOLVED] 438 - Object doesn't support this property or method
    By Revtim in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-12-2005, 05:05 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