Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Going to website & Entering username & password

From Excel VBA, Can I
go to a website
enter a username & password
proceed to a particular page
download a worksheet

I think if I can get by the 1st two steps I can do the rest.

Thanks for any pointers.
  #2   Report Post  
Posted to microsoft.public.excel.programming
ron ron is offline
external usenet poster
 
Posts: 118
Default Going to website & Entering username & password

On Jun 24, 10:02*am, wrote:
From Excel VBA, Can I
* * * * go to a website
* * * * enter a username & password
* * * * proceed to a particular page
* * * * download a worksheet

I think if I can get by the 1st two steps I can do the rest.

Thanks for any pointers.


First you'll need to look at the source code behind the login page and
see what terms they use for the username and password and then
substitute them into the code below, along with your actual username
and pw. Figuring ot how to click the submit button is also dependent
on the source code. If you could post the url, maybe I could be more
specific. In any case, insert the code below into a module and that
should get you started...Ron

Set ie = CreateObject("InternetExplorer.Application")

With ie
.Visible = True
.Navigate "https://your website.com"
.Top = 50
.Left = 530
.Height = 400
.Width = 400

' Loop until the page is fully loaded
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

' Make the desired selections on the Login web page and click the
submit button
Set ipf = ie.document.login_form.Item("usr_name")
ipf.Value = "your username or ID"

Set ipf = ie.document.login_form.Item("usr_password")
ipf.Value = "your pw"

ie.document.all.Item("login_form").submit

' Loop until the page is fully loaded
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

' Now do whatever
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Going to website & Entering username & password

Thank you. I have not trtied it but it is quite readable. There may be
more to it. Could you point me to a tutorial on interacting with web pages
or some other source of info?

Thanks again!!
On Thu, 24 Jun 2010 15:29:04 -0700 (PDT), ron wrote:

On Jun 24, 10:02*am, wrote:
From Excel VBA, Can I
* * * * go to a website
* * * * enter a username & password
* * * * proceed to a particular page
* * * * download a worksheet

I think if I can get by the 1st two steps I can do the rest.

Thanks for any pointers.


First you'll need to look at the source code behind the login page and
see what terms they use for the username and password and then
substitute them into the code below, along with your actual username
and pw. Figuring ot how to click the submit button is also dependent
on the source code. If you could post the url, maybe I could be more
specific. In any case, insert the code below into a module and that
should get you started...Ron

Set ie = CreateObject("InternetExplorer.Application")

With ie
.Visible = True
.Navigate "https://your website.com"
.Top = 50
.Left = 530
.Height = 400
.Width = 400

' Loop until the page is fully loaded
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

' Make the desired selections on the Login web page and click the
submit button
Set ipf = ie.document.login_form.Item("usr_name")
ipf.Value = "your username or ID"

Set ipf = ie.document.login_form.Item("usr_password")
ipf.Value = "your pw"

ie.document.all.Item("login_form").submit

' Loop until the page is fully loaded
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

' Now do whatever


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default Going to website & Entering username & password

On Thu, 24 Jun 2010 15:29:04 -0700 (PDT), ron wrote:

On Jun 24, 10:02*am, wrote:
From Excel VBA, Can I
* * * * go to a website
* * * * enter a username & password
* * * * proceed to a particular page
* * * * download a worksheet

I think if I can get by the 1st two steps I can do the rest.

Thanks for any pointers.


First you'll need to look at the source code behind the login page and
see what terms they use for the username and password and then
substitute them into the code below, along with your actual username
and pw. Figuring ot how to click the submit button is also dependent
on the source code. If you could post the url, maybe I could be more
specific. In any case, insert the code below into a module and that
should get you started...Ron

Set ie = CreateObject("InternetExplorer.Application")

With ie
.Visible = True
.Navigate "https://your website.com"
.Top = 50
.Left = 530
.Height = 400
.Width = 400

' Loop until the page is fully loaded
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

' Make the desired selections on the Login web page and click the
submit button
Set ipf = ie.document.login_form.Item("usr_name")
ipf.Value = "your username or ID"

Set ipf = ie.document.login_form.Item("usr_password")
ipf.Value = "your pw"

ie.document.all.Item("login_form").submit

' Loop until the page is fully loaded
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

' Now do whatever


Thanks again. With your help, I am able to get logged in. I was trying to
figure out how to go to the page I need & downolad a file when I learned
that they are replacing the website in July with something totally new so
I'll wait until then to work any more on it.

I would still like to know if any tutorial is available.

Thanks!
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
FollowHyperlink with Username and Password. Joergen Bondesen Excel Programming 0 June 19th 09 02:34 PM
Username and password login. Moh Excel Programming 10 December 21st 07 03:36 PM
Password/UserName Gordon[_15_] Excel Programming 1 January 19th 07 09:04 AM
display data from a website in excel that requires a username/password John Williams[_5_] Excel Programming 2 November 19th 04 02:34 PM
Excel password but cant hide the sheets before entering password cakonopka[_3_] Excel Programming 1 January 30th 04 06:28 PM


All times are GMT +1. The time now is 03:14 AM.

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

About Us

"It's about Microsoft Excel"