+ Reply to Thread
Results 1 to 8 of 8

Login Code Error

  1. #1
    Forum Contributor
    Join Date
    02-12-2018
    Location
    TX
    MS-Off Ver
    MS Office 2019
    Posts
    305

    Login Code Error

    Cross-Posted here: http://www.vbaexpress.com/forum/show...run-Login-Code

    That being said, I've been trying to scrape together a code that will work to auto login to several secure accounts. The current one is intended for banking (Chase). I'm getting a Run-Time Error 91 thrown at the following line:

    HTMLDoc.getElementById("userId").Value = "mylogin"

    I continue to get errors at this line. I can't figure out what I'm doing wrong. I went to Chase, did a right-click on the "login-box" and I think I have the information in there correctly, but could be wrong. Could. someone please look over the below code for me? Would greatly appreciate the help.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Exclamation

    Hi !

    "userID" does not exist on Chase webpage ! As Copy / Pasting is very not Coding …

    When you open this webpage using a webbrowser, what do you observe, how do you operate to log in ? …

  3. #3
    Forum Contributor
    Join Date
    02-12-2018
    Location
    TX
    MS-Off Ver
    MS Office 2019
    Posts
    305

    Re: Login Code Error

    Hi, thanks for reply. Several things. 1) Still working on my VBA chops...there’s plenty of copy/pasting going on and probably more to come. 2) “userId” is listed in log on box html code as either an element or tag... can’t remember which off the top of my head but the name should be Username.
    Last edited by Jim Clayton; 05-30-2019 at 10:07 AM. Reason: grammar

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Login Code Error


    Nope, just "inspect the element" via right click on it from the webbrowser to see its Id and not its name …

  5. #5
    Forum Contributor
    Join Date
    02-12-2018
    Location
    TX
    MS-Off Ver
    MS Office 2019
    Posts
    305

    Re: Login Code Error

    Ok now that I'm back in front of a computer and not a phone let me try to sort this out. Per Chase:
    Name="userId"
    Placeholder="Username"
    ID="userId-input-field"

    Now my train of thought is that I'm trying to call on something hasn't been set, but I reached that conclusion with my copious amounts of VBA knowledge so, it could very likely be wrong. Up to this point I've been plugging things in here and there and I keep ending up with one of the following three errors and almost always at the same spot: 91, 424, or 438 (I think). Thoughts?

  6. #6
    Forum Contributor
    Join Date
    02-12-2018
    Location
    TX
    MS-Off Ver
    MS Office 2019
    Posts
    305

    Re: Login Code Error

    Hello again. So I've been at this for days now trying every combination of things possible and reading page after page online...but I'm still hitting a brick wall with this. I've changed the code up more times than I can count. The closest I can get to this thing working is error messages or it re-directing me to the site where it cycles for a few seconds and then nothing happens. But I for some reason I think it's turning off my Number Lock on my keyboard when I run it. I could really use someone to point me in the right direction. Below is what I'm currently working with. And again, my knowledge on this stuff is limited so there's been a lot of guessing going on. Tks.

    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Login Code Error


    In initial code your mistake was just to use the name instead of the ID …

  8. #8
    Forum Contributor
    Join Date
    02-12-2018
    Location
    TX
    MS-Off Ver
    MS Office 2019
    Posts
    305

    Re: Login Code Error

    Thanks for the reply. I tried changing that and it wasn't successful. I get re-directed to the page, where nothing happens. I came across something Friday that said I need to reference the frames in order for it to work. So I did my best to do that and was directed to a different login page. So I think i'm on the right track with the frame referencing, but having never done that before, I don't know that I'm actually putting in the correct information.

+ 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. Need help in login vba code to unhide specific sheets depends on login info
    By AlaaEddin95 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2019, 08:19 PM
  2. [SOLVED] Getting error when running Login Code
    By JJFletcher in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-18-2018, 01:49 PM
  3. Error for website login codes
    By Carrol in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2015, 03:18 PM
  4. Code for login id to be unique
    By Gourav in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-09-2014, 04:15 PM
  5. Web page - login code
    By keen2xl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-10-2014, 12:59 AM
  6. Login Form Error
    By krjoshi in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2012, 12:54 AM
  7. login error
    By lyealain in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-11-2008, 03:03 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