Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
FollowHyperlink with Username and Password. | Excel Programming | |||
Username and password login. | Excel Programming | |||
Password/UserName | Excel Programming | |||
display data from a website in excel that requires a username/password | Excel Programming | |||
Excel password but cant hide the sheets before entering password | Excel Programming |