Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ana Ana is offline
external usenet poster
 
Posts: 44
Default automate excel to login web pages

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default automate excel to login web pages

I have some sample code on my site:

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


HTH,
JP

On Apr 14, 10:45*am, Ana 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
Ana Ana is offline
external usenet poster
 
Posts: 44
Default automate excel to login web pages

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 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default automate excel to login web pages

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 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default automate excel to login web pages

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=945656 92"
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 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
Ana Ana is offline
external usenet poster
 
Posts: 44
Default automate excel to login web pages

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=945656 92"
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 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


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default automate excel to login web pages

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=945656 92"
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 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=945656 92"
* * 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 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 -

  #8   Report Post  
Posted to microsoft.public.excel.programming
Ana Ana is offline
external usenet poster
 
Posts: 44
Default automate excel to login web pages

Hi,
I have just tried your code and it works thank you a lot :o))))))))



"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=945656 92"
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 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=945656 92"
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 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 -


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default automate excel to login web pages

Glad to hear it!

Thx,
JP

On Apr 22, 11:11*am, Ana wrote:
Hi,
I have just tried your code and it works thank you a lot :o))))))))



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I delete pages in Excel? Keeps printing blank pages at end. Jojobean Charts and Charting in Excel 1 May 31st 07 07:37 AM
Need Help -- Baseball stats in excel only has 23 pages--Need to addmore pages.. GE Cathey Setting up and Configuration of Excel 7 May 17th 07 09:42 PM
Need Help -- Baseball stats in excel only has 23 pages--Need to addmore pages... GE Cathey Excel Worksheet Functions 1 May 16th 07 08:17 PM
Automate moving between pages on a pivot table Meryl Miller Excel Programming 2 February 3rd 06 12:27 AM
How to automate web login? RB Smissaert Excel Programming 0 September 27th 05 07:19 PM


All times are GMT +1. The time now is 09:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"