+ Reply to Thread
Results 1 to 5 of 5

Macro generates the following error: "run-time error 424 object required"

  1. #1
    Forum Contributor
    Join Date
    02-16-2006
    Posts
    241

    Macro generates the following error: "run-time error 424 object required"

    I am receiving the error listed above for the following script.

    Please Login or Register  to view this content.
    Any help would be appreciated.

    Thanks,

    Met

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Macro generates the following error: "run-time error 424 object required"

    on which line?
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Macro generates the following error: "run-time error 424 object required"

    It seems to me that this code is modifying the VBA code itself. I got an error on the second "Application.Wait" line of code because the above line of code just inserted a "l" so the line now looks like "lApplication.Wait" which is not an Excel command.
    Also, why do you write the code as:
    Please Login or Register  to view this content.
    instead of just
    Please Login or Register  to view this content.
    which do not return an error.
    But I'm not very familiar with all tis.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Macro generates the following error: "run-time error 424 object required"

    Not sure what the code is intended to do ... Sendkeys is fraught with danger.

    Trying to test the code in the VBE causes it to write to, and corrupt, the code.

    But, whatever, your code ...

    I suspect the error is this line:

    Please Login or Register  to view this content.

    because WScript is not defined.

    If you had Option Explicit at the top of your code, it would have been highlighted when you tried to run the code.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Contributor
    Join Date
    02-16-2006
    Posts
    241

    Re: Macro generates the following error: "run-time error 424 object required"

    Thanks for everyones input. (The code is being modified by itself.) I will need to approach this a different way. I know I am going aroung the world to do a simple task but I can't see the forest for the trees, I guess.

    My goal: Auto log into a Add-in in an Excel file.

    Here is where I stand:

    I created a batch file to open excel. (If I open excel with a vbs file it does not load the Add-Ins.)

    Please Login or Register  to view this content.
    I created a script file to run a macro created in the excel file:

    Please Login or Register  to view this content.
    Then I run the macro: (It runs the add-in)

    Please Login or Register  to view this content.
    It runs the addin to a point but the login menu will not open until my macro closes so I was going to load another script, close the macro, and then use the other script to fill in the prompt which I hope will appear after the macro within Excel has closed. I'm sure I've confused the hell out of everyone by now but humor me if you have any suggestions.


    Thanks,

    Met

+ 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. Set Variable = File Path generates "Object Required" Error
    By Brian48072 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2013, 11:42 AM
  2. Run-time error "424": Object required
    By TGM™ in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-29-2012, 05:57 AM
  3. [SOLVED] "Object required" error in combo box/macro combination
    By chemeng1T3 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-09-2012, 10:32 AM
  4. [SOLVED] "Run-time error '424': Object required" error
    By jaff84 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2012, 10:43 AM
  5. [SOLVED] Excel 2007 : Help to Solve Run-time Error 424 "Object Required"
    By D.S.Rama Rao in forum Excel General
    Replies: 6
    Last Post: 03-05-2012, 03:24 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