vba and username/password

bestox

Board Regular
Joined
Apr 2, 2009
Messages
82
my status quo is, that the form of the login page gets filled out, but after submitting the form, the internet explorer stays somewhere and does not enter the portal.

my code is this

Code:
Dim ie As Object
    Dim lform As Object
 
    Set ie = CreateObject("internetexplorer.Application")
    ie.Navigate2 "[URL]https://www.someurl.com/register.do?targetUrl=%2Fhome.do[/URL]"
    Do Until ie.ReadyState = 4
        DoEvents
    Loop
    ie.Visible = True ' optional
    Set lform = ie.Document.forms(0)
    With lform
        lform("email").Value = [EMAIL="john.doe@gmail.com"]john.doe@gmail.com[/EMAIL]
        lform("password").Value = "john1"
        lform.submit
    End With

i should add, the i guess my login-page is in jsp format. i think it has to do something with the fact that i use the post-method too. i could not find any advice in google.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
i should add some source code from the login webpage

this is the header of the form

<FORM name=externalLoginForm action=/externalLogin.do method=post><FORM name="externalLoginForm" method="post" action="/externalLogin.do">
Code:
<''form name="externalLoginForm" method="post" action="/externalLogin.do">
<''input type="hidden" name="targetUrl" value="/home.do" />

there are input types i can fill up (that works fine)

Code:
<''input type="text" name="email" size="40" value="" />
<''input type="password" name="password" size="40" value="" />

but, it s strange, there is no input type = "submit". moreover, i find this

Code:
<''input type="image" name="login" src="/img/buttonlogin.gif" border="0" title="login" alt="login" />

i used the '' to avoid the forum parser</FORM>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,340
Messages
6,124,382
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top