+ Reply to Thread
Results 1 to 15 of 15

Runtime Error '424' Object Required

  1. #1
    Registered User
    Join Date
    02-01-2011
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Excel 2007
    Posts
    57

    Runtime Error '424' Object Required

    Hey guys,
    I'm very new to VBA, but i'm having trouble with this. I'm attemping to have excel run internet explorer, open a certain website and log me in using my org id, user id & password. here's the website... https://www.mersonline.org/mers/security/logonframe.htm. the problem i run in to is a Runtime Error 424 Object Required. can someone have a look and see if they can't solve this? also i'm just using a standard untouched excel workbook. named Book1, using Sheet1 if needed. Also, if possible, would like to have a hyperlink to the website/macro that would run this by clicking it, thanks!

    Please Login or Register  to view this content.
    Last edited by Paul; 10-02-2012 at 06:31 PM. Reason: Added CODE tags for new user. Please do so yourself in the future.

  2. #2
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Runtime Error '424' Object Required

    When you create the object with the set statement you name it "oIE", but later you are referring to it as "IE".
    You should alter the lines with "IE.xx" to "oIE.xxxx".
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  3. #3
    Registered User
    Join Date
    02-01-2011
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Runtime Error '424' Object Required

    thanks tsjallie for the quick response! i did as you said and now it's giving me a "runtime error 91 object variable or with block variable not set" message. again im new to this so i thank you for your patience, i'm going to guess its somewhere after the "Do" command because it seems to load the website up until i need it to log me in. i've taken out the password info and replaced with xxxxxx, as that's the one thing i know for sure, and it can get me in some trouble putting it out there. Also is there a way to create a hyperlink out of this to sheet1 (any cell) that would run this rule when the hyperlink is clicked? thanks for the help!

    Please Login or Register  to view this content.
    Last edited by Leith Ross; 10-05-2012 at 03:07 PM. Reason: Added Code Tags

  4. #4
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Runtime Error '424' Object Required

    Getting the same error.
    Entered DIM oIE as object: same error
    Deleted the END at line 18: same error

    I really don't see what's wrong. Googling always shows roughly the same approach.
    Hope some guru is watching this and comes up with a solution.

  5. #5
    Registered User
    Join Date
    02-01-2011
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Runtime Error '424' Object Required

    i've done some searching and actually found some code that works, when you debug it however im not sure how to pair it with opening internet explorer and running it altogether. it only works when i already have the website open.

    Please Login or Register  to view this content.
    Last edited by Leith Ross; 10-05-2012 at 03:08 PM. Reason: Added Code Tags

  6. #6
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Runtime Error '424' Object Required

    Sendkeys did cross my mind, but it's a very rude method and in my opinion not suitable for a permanent solution.
    You must realize that the keystrokes are sent to the window which has focus. That is why you can't test it from VB-editor.
    You will have to run it as a macro from you excel sheet.

    Try this macro:
    Please Login or Register  to view this content.
    By the way, I think the problem with other error comes from some missing library. I only don't which one.
    Tbc

  7. #7
    Registered User
    Join Date
    02-01-2011
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Runtime Error '424' Object Required

    awesome, works perfectly. if i were to want to use this for adding say whatever is in cell A1 to this website would that just be "($A$1)" in place of orig id/user/pass? in other words there is a hyperlink within this website that i would like to get to (could be accomplished by hitting enter, then tab 15 times, then enter again) and then i would select a field within that hyperlinked screen (again could be accomplished this time by hitting enter, tab 12 times, add cell A1 then enter again) and paste info from cell A1. thanks a ton for all the help!
    Last edited by kboy1289; 10-05-2012 at 02:37 PM.

  8. #8
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Runtime Error '424' Object Required

    Yes, you can. Try this one.
    Attached Files Attached Files

  9. #9
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Smile Re: Runtime Error '424' Object Required

    Finally managed to solve the problem!
    The elements we are looking for are in a frame. As a matter of fact in the second frame on the page.
    Here is the sheet that workes properly (so, not uses sendkeys) and read the credentials from cells in a worksheet.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-01-2011
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Runtime Error '424' Object Required

    perfect! one last thing, after logging in there is a screen with a clickable link "MIN Information". i've tried viewing the source and looked for the ID and Name to reference those, didn't work (could be i'm just doing it wrong). i tried using the send keys with tab and enter to highlight and click the link, didnt work. it looks like its javascript im wondering if that has anything to do with it. is there a way to reference an href?

    <UL id="main">
    <LI class='heading'>Main Menu</LI>
    <LI><A usemenucache="main" href=../administration/msglink.jsp?aux=3EA0D24BBCEC8080AB345AE65635E40E005C370E>Messages</A></LI>
    <LI><A usemenucache="administration" href=../administration/default.jsp?aux=3EA0D24BBCEC8080AB345AE65635E40E005C370E>Administration</A></LI>



    <LI><A usemenucache="main" href=../registration/enterminreg.jsp?aux=3EA0D24BBCEC8080AB345AE65635E40E005C370E>Registration</A></LI>


    <LI><A usemenucache="reversal" href=../deactivation/defaultreversals.jsp?aux=3EA0D24BBCEC8080AB345AE65635E40E005C370E>Reversals</A></LI>


    <LI><A usemenucache="main" href=../mininfo/minfind.jsp?aux=3EA0D24BBCEC8080AB345AE65635E40E005C370E>MIN Information</A></LI>



    <LI><A usemenucache="tos" href=../tos/default.jsp?aux=3EA0D24BBCEC8080AB345AE65635E40E005C370E>TOS Menu</A></LI>


    <LI><A usemenucache="tob" href=../tob/default.jsp?aux=3EA0D24BBCEC8080AB345AE65635E40E005C370E>TOB Menu</A></LI>
    Attached Images Attached Images
    Attached Files Attached Files

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,626

    Re: Runtime Error '424' Object Required

    I don't see any javascript and I think the jsp extension is for Java Server Page.

    Anyway, you can loop through the collection of links and check their href for minfind.jsp to identify the one you want.

    Something like this perhaps.
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    02-01-2011
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Runtime Error '424' Object Required

    norie,
    i've tried every variable to and including minfind.jsp. not working. generally i wouldn't throw my username and password around but im inclined to let someone take a crack at it, if they're willing i'll message the info nothing worth seeing in there anyway. i'll be picking up a copy of VBA for dummies tonight or anything else worth reading that anyone suggests. thanks guys.

  13. #13
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,626

    Re: Runtime Error '424' Object Required

    That code was just off the top of my head but in theory should works.

    How did you try it?

    PS You can PM me the info if you want.

  14. #14
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,626

    Re: Runtime Error '424' Object Required

    Here you are, this should get you to the MIN search page.

    It's basically the code Tsjallie posted, I only added a few lines at the end.
    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    02-01-2011
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Runtime Error '424' Object Required

    thanks! this works great

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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