+ Reply to Thread
Results 1 to 4 of 4

Google Translate Excel VBA run time 424 issue - getElementByID

  1. #1
    Registered User
    Join Date
    12-01-2018
    Location
    Houston, TX
    MS-Off Ver
    365
    Posts
    2

    Google Translate Excel VBA run time 424 issue - getElementByID

    I used the below Excel VBA function for Google Translate, and it worked perfectly in October 2018. But this week, I tried to use it, and I get the run time error 424 (object required) at the following line:

    CLEAN_DATA = Split(Application.WorksheetFunction.Substitute(IE.Document.getElementById("result_box").innerHTML, "</SPAN>", ""), "<")

    Do you know what has changed in the past month to result in this code not working anymore? I think the ID for Google Translate may have changed, but I do not know how to check and pull the correct ID for the translation results.

    -------------
    Please Login or Register  to view this content.
    Last edited by FDibbins; 12-01-2018 at 03:14 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Google Translate Excel VBA run time 424 issue - getElementByID

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    12-01-2018
    Location
    Houston, TX
    MS-Off Ver
    365
    Posts
    2

    Re: Google Translate Excel VBA run time 424 issue - getElementByID

    I chatted with a friend who is familiar with HTML. He was able to check out the Google Translate website and find the new name for the translation box. Here is the code that works now.

    CLEAN_DATA = Split(Application.WorksheetFunction.Substitute(IE.Document.getElementsByClassName("tlid-translation translation")(0).innerHTML, "</SPAN>", ""), "<")


    So, this will work till Google changes it ...

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Google Translate Excel VBA run time 424 issue - getElementByID

    Thanks for the feedback, Im sure it will help members

+ 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] Get google translate result from vba?
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 01-29-2021, 07:36 PM
  2. Macro: translate text from cell using google translate
    By Marc_excel_tips in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 01-05-2021, 06:18 AM
  3. Google Translate VBA Function
    By beardguy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-06-2018, 06:17 PM
  4. [SOLVED] GetElementById vba issue
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 43
    Last Post: 02-28-2018, 02:02 PM
  5. Upload excel sheet to google translate (and pull the result) via VBA
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2017, 04:02 PM
  6. How to catch errors from Google Translate
    By MrsMac in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-29-2014, 09:18 AM
  7. need Google Translate in Excel 2003
    By appu_gusai in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2013, 08:27 AM

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