+ Reply to Thread
Results 1 to 6 of 6

ERROR 438 - GetElementsByClassName on VBA

  1. #1
    Registered User
    Join Date
    12-12-2018
    Location
    Brazil
    MS-Off Ver
    2016
    Posts
    3

    ERROR 438 - GetElementsByClassName on VBA

    Hi guys
    this is my first question here, hope you see me often from now on.

    I was using a code today, and it was running perfectly this morning - And now, i get "RUN-TIME ERROR '438': Object doesn't support this property or method"
    the error occurs on this line of code:

    Please Login or Register  to view this content.

    thanks a lot :D

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: ERROR 438 - GetElementsByClassName on VBA

    For ClassName you'd need reference to the external library.

    This is one of the quirk in HTML library. getElement(s)Byxxxx can misbehave except for TagName, ID.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    12-12-2018
    Location
    Brazil
    MS-Off Ver
    2016
    Posts
    3

    Re: ERROR 438 - GetElementsByClassName on VBA

    Quote Originally Posted by CK76 View Post
    For ClassName you'd need reference to the external library.
    CK76, I didn't get it!
    can you give me an example, please? :D

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: ERROR 438 - GetElementsByClassName on VBA

    Here's sample code I posted in another forum.
    Please Login or Register  to view this content.
    In VBE, go to Tools->References. And add Microsoft HTML Object library and Microsoft Internet Controls library to your project.
    This will ensure that you can access all the available methods (though there are few minor quirks even when library is added, such as when writing to HTMLFile object).

    Note: Looks like some spaces got removed when I copied and pasted. I think I fixed it, but may have missed some.
    Last edited by CK76; 12-17-2018 at 09:57 AM.

  5. #5
    Registered User
    Join Date
    12-12-2018
    Location
    Brazil
    MS-Off Ver
    2016
    Posts
    3

    Re: ERROR 438 - GetElementsByClassName on VBA

    Thanks CK76, it worked for me!!! :D

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: ERROR 438 - GetElementsByClassName on VBA

    You are welcome

    If your issue is resolved. Please mark the thread as solved by using Thread tools found at top of your initial post.

+ 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. [SOLVED] doc.GetElementsByClassname with weirdly formatted classnames
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-23-2016, 12:58 PM
  2. [SOLVED] IE.Document.getElementsByClassName Object not supporting property or method
    By kamelkid2 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-04-2014, 08:17 AM
  3. [SOLVED] Run-tim error -2147467259(80004005): Automation error Unspecidied error
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2014, 12:12 PM
  4. [SOLVED] getElementsByClassName Wildcard Character?
    By killerkoz17 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-08-2013, 08:10 AM
  5. [SOLVED] getElementsByClassName from Yammer causing Run-time error 91
    By gerainta in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-20-2013, 05:49 AM
  6. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  7. Error Handling - On Error GoTo doesn't trap error successfully
    By David in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2006, 02:10 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