+ Reply to Thread
Results 1 to 8 of 8

Error in extracting web html page

  1. #1
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Error in extracting web html page

    Hi,

    I found a code in this link and try to run it from Excel.

    Please Login or Register  to view this content.
    It gives me an error #438 "Object doesn't support this property or method" at the red line.

    Because in that link the code is the accepted answer, I wonder what did I do wrong ?
    Do I need to do something else maybe ?

    Any kind of help would be greatly appreciated.
    Thank you in advanced.

    (Attached is the inspector result from IE if maybe can help).
    Attached Images Attached Images

  2. #2
    Registered User
    Join Date
    04-01-2019
    Location
    HK
    MS-Off Ver
    2010
    Posts
    32

    Re: Error in extracting web html page

    getElementsByClassName

  3. #3
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: Error in extracting web html page

    Hi efvba,

    It still gives me an error after I change the "getElementByClassName" to "getElementsByClassName" on the same red code.
    But the error now is error 91 : object variable or With block variable not set.
    (I've also tried changing the "gelElementByTagName" to "getElementsByTagName", but still the same error 91)

    Attached is the Tool References in my VBA editor.

    Thank you.
    Attached Images Attached Images
    Last edited by karmapala; 04-17-2019 at 02:15 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: Error in extracting web html page

    Please Login or Register  to view this content.
    I'm playing around with the codes by single quote some original line (the green one),
    and make some new lines (the blue one)... and now it works. My active sheet (cell A1 and B1) now fill with the rating.

    I wonder why it isn't working with the green line.

    Thank you.

  5. #5
    Registered User
    Join Date
    04-01-2019
    Location
    HK
    MS-Off Ver
    2010
    Posts
    32

    Re: Error in extracting web html page

    No errors. Maybe you try my corrected code again.

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: Error in extracting web html page

    I've copied your code then paste it then run it.
    I am very sorry, it is still the same error 91 at the red line, efvba.

    My IE is ver 11.0 if it's maybe the problem ?

  7. #7
    Registered User
    Join Date
    04-01-2019
    Location
    HK
    MS-Off Ver
    2010
    Posts
    32

    Re: Error in extracting web html page

    Not IE problem. My IE is also 11.

    I think 3 pages are loaded in your first posted VBA, so the first HTML object is no longer applicable.

    But it is ok for me, I don't understand.

  8. #8
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: Error in extracting web html page

    I still wonder, why if I change your code at the line
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Then the code runs well, no error

    Anyway, thank you once again for your help, efvba.
    I really appreciate it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Extracting information from HTML into VBA
    By mp3909 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-24-2018, 12:33 PM
  2. Extracting string from HTML
    By GIS2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2014, 08:40 AM
  3. Extracting Pre-Determined Value from HTML Table using VBA
    By kajab in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-20-2013, 04:44 PM
  4. Extracting HTML from URL's VIA VBA/'MACRO
    By kmpoaquests in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2013, 09:05 AM
  5. Extracting Information from Past Page and Listing it on Different Page
    By gibbstom13 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-01-2012, 04:00 PM
  6. extracting page number from page setup footer
    By Conor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2008, 01:43 PM
  7. Extracting HTML from web based query?
    By 99atlantic in forum Excel General
    Replies: 1
    Last Post: 06-15-2006, 06:15 PM

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