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.
 

Some videos you may like

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

bestox

Board Regular
Joined
Apr 2, 2009
Messages
82
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:

Watch MrExcel Video

Forum statistics

Threads
1,119,249
Messages
5,576,948
Members
412,753
Latest member
Coach_Olson
Top