+ Reply to Thread
Results 1 to 13 of 13

Please help with IE automation by VBA

  1. #1
    Registered User
    Join Date
    03-22-2012
    Location
    Bangalore, IND
    MS-Off Ver
    EXCEL 2010, 2007
    Posts
    90

    Please help with IE automation by VBA

    Hi all ,



    Hope all are doing grt



    I am again struck with a piece of snippet , I am not sure how to approach with ie automation... somehow I managed to create code.. but the vain is that after autoamting iexplorer is opening with the site , but the user name and password its not taking and submitting

    please help

    thanx in advance

    Please Login or Register  to view this content.



    down I am mentioning the html codedat may help u !!



    HTML Code: 
    Last edited by vpnvipin; 04-27-2012 at 02:20 AM. Reason: solved

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Please help with IE automation by VBA

    Hi,

    Maybe try this:

    Please Login or Register  to view this content.
    If it doesn't work, try changing loginForm.user to just user loginForm.password to just password. If it still fails then please save the login page as an mhtml page and upload it so I can see the actual page.

    Hope this helps.

    abousetta
    Last edited by abousetta; 04-25-2012 at 07:14 AM.
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Please help with IE automation by VBA

    Also please edit your posts above. You are missing the closing tags for the vba and html codes. [CODE] ["/CODE"] and [HTML] ["/HTML"] without the quotation marks.

  4. #4
    Registered User
    Join Date
    03-22-2012
    Location
    Bangalore, IND
    MS-Off Ver
    EXCEL 2010, 2007
    Posts
    90

    Re: Please help with IE automation by VBA

    Hy abousetta

    Thank you very much almost done a bit more issue is there at last line of snippet

    Please Login or Register  to view this content.
    Here getting run time error 91

    object variable or block with variable not set

    wat will be the issue? I tried to change the login keywords but did't work out!!






    and
    it is as per u said in last paragraph
    ' Username
    While UName Is Nothing: Set UName = ieApp.Document.forms(0).all("user"): Wend

    its working well!!
    Vipin Oceans

  5. #5
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Please help with IE automation by VBA

    Hi,

    Maybe try:

    Please Login or Register  to view this content.
    If not, then please save the login webpage as an mhtml file and upload.

    abousetta

  6. #6
    Registered User
    Join Date
    03-22-2012
    Location
    Bangalore, IND
    MS-Off Ver
    EXCEL 2010, 2007
    Posts
    90

    Re: Please help with IE automation by VBA

    hi

    still that error is there (Runtime 91)


    I am attaching mhtml file please have a check on that

    meta.zip

    unable to upload as mhtml so zipped

    thanks for ur valuable time and help...


  7. #7
    Registered User
    Join Date
    03-22-2012
    Location
    Bangalore, IND
    MS-Off Ver
    EXCEL 2010, 2007
    Posts
    90

    Re: Please help with IE automation by VBA

    hi one more error is coming now !!


    err.png


    what will be the cause , its not always but some times!

  8. #8
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Please help with IE automation by VBA

    Thanks for uploading the mhtml file. It makes it a lot easier when I can test it from my end.

    This seems to be working now:

    Please Login or Register  to view this content.
    As for your error message, it means that you closed the IE window before the code was done running. If you want you can put On Error resume Next at the top of your code right after the declarations but I personally believe that it causes more harm than good because you should want to know if errors occur and where they occur. But there are times when this comes in handy or if you are giving to someone to use. Then at least it doesn't work instead of a weird error message popping up that they don't understand what to do with.

    Let me know if this solves your problem.

    Thanks.

    abousetta

    P.S. Thanks for the positive rep

    [CODE]

  9. #9
    Registered User
    Join Date
    03-22-2012
    Location
    Bangalore, IND
    MS-Off Ver
    EXCEL 2010, 2007
    Posts
    90

    Re: Please help with IE automation by VBA

    Thanks a ton , hope U help again lot of people@@ great awesome job

  10. #10
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Please help with IE automation by VBA

    Thanks for the feedback and glad its working now.

    Good luck.

    abousetta

  11. #11
    Registered User
    Join Date
    02-25-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Please help with IE automation by VBA

    sir,
    i have a more than 50 employees user name, password and dob, i want to check their details every day by entering the username, password and dob by manually,
    i have listed the username, password and dob of the employees in one sheet

    is there any excel vb codes to login this website https://incometaxindiaefiling.gov.in...LoginHome.html by automatically by clicking Command button for selected employee in another sheet. i done partly but i don,t no to how to solve it

    Please help me

    for details please see the attached file

  12. #12
    Registered User
    Join Date
    03-22-2012
    Location
    Bangalore, IND
    MS-Off Ver
    EXCEL 2010, 2007
    Posts
    90

    Re: Please help with IE automation by VBA

    Hi Indhrui,

    Even if your subject is related as per forum rules you should create a new thread for different requirement

  13. #13
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Please help with IE automation by VBA

    Hello @Indhrui and welcome to the forum,

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Thanks.

    abousetta

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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