PC Review


Reply
Thread Tools Rate Thread

automate excel to login web pages

 
 
Ana
Guest
Posts: n/a
 
      14th Apr 2008
Hi,

I would like to know if anyone has a solution to log in into a web page that
requires a user name and a password from a macro.
I tried diferent codes from internet without any result

Is it possible to do it with a web query ?
I have just need to log to
https://www.bernstein.com/Reports/Su...relid=94565692

and then copy a table with values

Is it posible to copy the values from a table form i.explorer to excel or
shall I save the page first and then open it with excel?

any ideas?

thanks

 
Reply With Quote
 
 
 
 
JP
Guest
Posts: n/a
 
      14th Apr 2008
I have some sample code on my site:

http://www.codeforexcelandoutlook.co...tExplorer.html


HTH,
JP

On Apr 14, 10:45*am, Ana <A...@discussions.microsoft.com> wrote:
> Hi,
>
> I would like to know if anyone has a solution to log in into a web page that
> requires a user name and a password from a macro.
> I tried diferent codes from internet without any result
>
> Is it possible to do it *with a web query ?
> I have just need to log tohttps://www.bernstein.com/Reports/Summary.aspx?nid=108&relid=94565692
>
> and then copy a table with values
>
> Is it posible to copy the values from a table form i.explorer to excel or
> shall I save the page first and then open it with excel?
>
> any ideas?
>
> thanks


 
Reply With Quote
 
Dan R.
Guest
Posts: n/a
 
      14th Apr 2008
Try this:

Sub test()
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate "https://www.bernstein.com/login.aspx?ReturnUrl=" & _
"%2fReports%2fSummary.aspx%3fnid%" & _
"3d108%26relid%3d94565692&nid=108&relid=94565692"
Do Until .ReadyState = 4
DoEvents
Loop
Set ipf = .Document.all.Item("UserName")
ipf.Value = "username"
Set ipf = .Document.all.Item("Password")
ipf.Value = "password"
SendKeys "{ENTER}", True
End With
End Sub

--
Dan


On Apr 14, 9:45*am, Ana <A...@discussions.microsoft.com> wrote:
> Hi,
>
> I would like to know if anyone has a solution to log in into a web page that
> requires a user name and a password from a macro.
> I tried diferent codes from internet without any result
>
> Is it possible to do it *with a web query ?
> I have just need to log tohttps://www.bernstein.com/Reports/Summary.aspx?nid=108&relid=94565692
>
> and then copy a table with values
>
> Is it posible to copy the values from a table form i.explorer to excel or
> shall I save the page first and then open it with excel?
>
> any ideas?
>
> thanks

 
Reply With Quote
 
Ana
Guest
Posts: n/a
 
      15th Apr 2008
Thanks for your help I tried your code , I am able to open de page, write the
user and the password but nothing else. It does not log in with the
information.

That is the same problem with all the code I tried I am not able to " clic
in the log in button "

Any idea?
thanks again


"JP" wrote:

> I have some sample code on my site:
>
> http://www.codeforexcelandoutlook.co...tExplorer.html
>
>
> HTH,
> JP
>
> On Apr 14, 10:45 am, Ana <A...@discussions.microsoft.com> wrote:
> > Hi,
> >
> > I would like to know if anyone has a solution to log in into a web page that
> > requires a user name and a password from a macro.
> > I tried diferent codes from internet without any result
> >
> > Is it possible to do it with a web query ?
> > I have just need to log tohttps://www.bernstein.com/Reports/Summary.aspx?nid=108&relid=94565692
> >
> > and then copy a table with values
> >
> > Is it posible to copy the values from a table form i.explorer to excel or
> > shall I save the page first and then open it with excel?
> >
> > any ideas?
> >
> > thanks

>
>

 
Reply With Quote
 
Ana
Guest
Posts: n/a
 
      15th Apr 2008
Thanks for your help,

I tried your but I still have the same problem I can open de page, write the
user and the password but nothing else. I can not log in.

SendKeys "{ENTER}", True

does not work for me but If I do it manually on the page it works with enter

any suggestions?

thanks again


Any idea?
thanks again

"Dan R." wrote:

> Try this:
>
> Sub test()
> Set ie = CreateObject("InternetExplorer.Application")
> With ie
> .Visible = True
> .Navigate "https://www.bernstein.com/login.aspx?ReturnUrl=" & _
> "%2fReports%2fSummary.aspx%3fnid%" & _
> "3d108%26relid%3d94565692&nid=108&relid=94565692"
> Do Until .ReadyState = 4
> DoEvents
> Loop
> Set ipf = .Document.all.Item("UserName")
> ipf.Value = "username"
> Set ipf = .Document.all.Item("Password")
> ipf.Value = "password"
> SendKeys "{ENTER}", True
> End With
> End Sub
>
> --
> Dan
>
>
> On Apr 14, 9:45 am, Ana <A...@discussions.microsoft.com> wrote:
> > Hi,
> >
> > I would like to know if anyone has a solution to log in into a web page that
> > requires a user name and a password from a macro.
> > I tried diferent codes from internet without any result
> >
> > Is it possible to do it with a web query ?
> > I have just need to log tohttps://www.bernstein.com/Reports/Summary.aspx?nid=108&relid=94565692
> >
> > and then copy a table with values
> >
> > Is it posible to copy the values from a table form i.explorer to excel or
> > shall I save the page first and then open it with excel?
> >
> > any ideas?
> >
> > thanks

>

 
Reply With Quote
 
Dan R.
Guest
Posts: n/a
 
      15th Apr 2008
Try this one:

Sub test()
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate "https://www.bernstein.com/login.aspx?ReturnUrl=" & _
"%2fReports%2fSummary.aspx%3fnid%" & _
"3d108%26relid%3d94565692&nid=108&relid=94565692"
Do Until .ReadyState = 4
DoEvents
Loop
Set ipf = .Document.all.Item("UserName")
ipf.Value = "username"
Set ipf = .Document.all.Item("Password")
ipf.Value = "password"
Set ipf = .Document.all.Item("LoginButton")
Do Until .ReadyState = 4
DoEvents
Loop
ipf.Click
End With
End Sub

--
Dan


On Apr 15, 8:18*am, Ana <A...@discussions.microsoft.com> wrote:
> Thanks for your help,
>
> I tried your but I still have the same problem I can open de page, write the
> user and the password but nothing else. *I can not log in.
>
> SendKeys "{ENTER}", True *
>
> does not work for me but If I do it manually on the page it works with enter
>
> any suggestions?
>
> thanks again
>
> Any idea?
> thanks again
>
>
>
> "Dan R." wrote:
> > Try this:

>
> > Sub test()
> > * Set ie = CreateObject("InternetExplorer.Application")
> > * With ie
> > * * .Visible = True
> > * * .Navigate "https://www.bernstein.com/login.aspx?ReturnUrl=" & _
> > * * * * * * "%2fReports%2fSummary.aspx%3fnid%" & _
> > * * * * * * "3d108%26relid%3d94565692&nid=108&relid=94565692"
> > * * Do Until .ReadyState = 4
> > * * * DoEvents
> > * * Loop
> > * * Set ipf = .Document.all.Item("UserName")
> > * * ipf.Value = "username"
> > * * Set ipf = .Document.all.Item("Password")
> > * * ipf.Value = "password"
> > * * SendKeys "{ENTER}", True
> > * End With
> > End Sub

>
> > --
> > Dan

>
> > On Apr 14, 9:45 am, Ana <A...@discussions.microsoft.com> wrote:
> > > Hi,

>
> > > I would like to know if anyone has a solution to log in into a web page that
> > > requires a user name and a password from a macro.
> > > I tried diferent codes from internet without any result

>
> > > Is it possible to do it *with a web query ?
> > > I have just need to log tohttps://www.bernstein.com/Reports/Summary.aspx?nid=108&relid=94565692

>
> > > and then copy a table with values

>
> > > Is it posible to copy the values from a table form i.explorer to excelor
> > > shall I save the page first and then open it with excel?

>
> > > any ideas?

>
> > > thanks- Hide quoted text -

>
> - Show quoted text -

 
Reply With Quote
 
JP
Guest
Posts: n/a
 
      15th Apr 2008
Using the sample code from my site, it would be

Set ElementCol = appIE.Document.getElementsByTagName("INPUT")

For Each btnInput In ElementCol
If btnInput.Id = "LoginButton" Then
btnInput.Click
Exit For
End If
Next btnInput

And I believe the code in Dan's last post would work as well.

--JP

On Apr 15, 9:13*am, Ana <A...@discussions.microsoft.com> wrote:
> Thanks for your help I tried your code , I am able to open de page, write the
> user and the password but nothing else. It does not log in with the
> information.
>
> That is the same problem with all the code I tried *I am not able to " clic
> in the log in *button "
>
> Any idea?
> thanks again
>
>
>

 
Reply With Quote
 
Ana
Guest
Posts: n/a
 
      22nd Apr 2008
Hi,
I have just tried your code and it works thank you a lot ))))))))



"Dan R." wrote:

> Try this one:
>
> Sub test()
> Set ie = CreateObject("InternetExplorer.Application")
> With ie
> .Visible = True
> .Navigate "https://www.bernstein.com/login.aspx?ReturnUrl=" & _
> "%2fReports%2fSummary.aspx%3fnid%" & _
> "3d108%26relid%3d94565692&nid=108&relid=94565692"
> Do Until .ReadyState = 4
> DoEvents
> Loop
> Set ipf = .Document.all.Item("UserName")
> ipf.Value = "username"
> Set ipf = .Document.all.Item("Password")
> ipf.Value = "password"
> Set ipf = .Document.all.Item("LoginButton")
> Do Until .ReadyState = 4
> DoEvents
> Loop
> ipf.Click
> End With
> End Sub
>
> --
> Dan
>
>
> On Apr 15, 8:18 am, Ana <A...@discussions.microsoft.com> wrote:
> > Thanks for your help,
> >
> > I tried your but I still have the same problem I can open de page, write the
> > user and the password but nothing else. I can not log in.
> >
> > SendKeys "{ENTER}", True
> >
> > does not work for me but If I do it manually on the page it works with enter
> >
> > any suggestions?
> >
> > thanks again
> >
> > Any idea?
> > thanks again
> >
> >
> >
> > "Dan R." wrote:
> > > Try this:

> >
> > > Sub test()
> > > Set ie = CreateObject("InternetExplorer.Application")
> > > With ie
> > > .Visible = True
> > > .Navigate "https://www.bernstein.com/login.aspx?ReturnUrl=" & _
> > > "%2fReports%2fSummary.aspx%3fnid%" & _
> > > "3d108%26relid%3d94565692&nid=108&relid=94565692"
> > > Do Until .ReadyState = 4
> > > DoEvents
> > > Loop
> > > Set ipf = .Document.all.Item("UserName")
> > > ipf.Value = "username"
> > > Set ipf = .Document.all.Item("Password")
> > > ipf.Value = "password"
> > > SendKeys "{ENTER}", True
> > > End With
> > > End Sub

> >
> > > --
> > > Dan

> >
> > > On Apr 14, 9:45 am, Ana <A...@discussions.microsoft.com> wrote:
> > > > Hi,

> >
> > > > I would like to know if anyone has a solution to log in into a web page that
> > > > requires a user name and a password from a macro.
> > > > I tried diferent codes from internet without any result

> >
> > > > Is it possible to do it with a web query ?
> > > > I have just need to log tohttps://www.bernstein.com/Reports/Summary.aspx?nid=108&relid=94565692

> >
> > > > and then copy a table with values

> >
> > > > Is it posible to copy the values from a table form i.explorer to excel or
> > > > shall I save the page first and then open it with excel?

> >
> > > > any ideas?

> >
> > > > thanks- Hide quoted text -

> >
> > - Show quoted text -

>

 
Reply With Quote
 
JP
Guest
Posts: n/a
 
      27th Apr 2008
Glad to hear it!

Thx,
JP

On Apr 22, 11:11*am, Ana <A...@discussions.microsoft.com> wrote:
> Hi,
> I have just tried your code and it works thank you a lot ))))))))
>
>
>

 
Reply With Quote
 
avardaneg
Guest
Posts: n/a
 
      27th Jun 2008
Guys,

I'm trying to do something similar to what Ana was trying to do, the only
difference is that when I go to access the secured website I need, I need to
fill out the user id and password in a separate window that pops up... Any
suggestions on how I can tweak your pieces of code in order to fill out the
id & pwd in this separate window instead of the main window?

Thanks.

"JP" wrote:

> Glad to hear it!
>
> Thx,
> JP
>
> On Apr 22, 11:11 am, Ana <A...@discussions.microsoft.com> wrote:
> > Hi,
> > I have just tried your code and it works thank you a lot ))))))))
> >
> >
> >

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automate exporting multiple report pages to HTML pages LTC Microsoft Access External Data 0 9th Feb 2006 09:35 PM
How to automate web login? RB Smissaert Microsoft Excel Programming 0 27th Sep 2005 07:19 PM
Automate VPN Login? =?Utf-8?B?bWFya21pZHdlc3Q=?= Windows XP Networking 1 18th Jul 2005 12:11 PM
Automate login =?Utf-8?B?YmlncmF5?= Windows XP Security 1 5th Sep 2004 02:33 AM
How to automate login in XP Kani Windows XP Setup 0 27th Nov 2003 07:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:57 AM.