LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Login to a web page & automatically fill in pasword

Hi
IE v6.0

This is my 1st attempt at this , so please bear with me.

I want to logon to my banks site & get my stock/shares values to add to a
worksheet.
I need vba to fill in the logon password/ID boxes on the login page for me.

I got to get past the first page that requires the passwords etc, but
there's a second page with a continue button that's stumped me.
It won't accept .click or .submit:

This is as far as I've got:
the ** line is the problem

Have I got the right page/form?

Sub LoginSite()
Dim oIE As New SHDocVw.InternetExplorer
Dim sSearchTerm As String
Dim sURL As String

sSearchTerm = "programically fill out web form"

sURL = '"https://www.mybank.co.uk/frames/login_body.asp"

'open a new, visible IE window
Set oIE = New SHDocVw.InternetExplorer
oIE.Visible = True

'go to desired page
oIE.Navigate sURL

'wait for page to finish loading
Do Until oIE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop

oIE.Document.all("txtCustomerID").Value = "MyID"
oIE.Document.all("txtPassnumber").Value = "MyPass"
oIE.Document.forms(0).submit
Do Until oIE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
' **oIE.Document.forms(0).submit
' This doesn't work either:
' oIE.Document.all("Continue").click
End Sub

This is the source code (& a bit more I think):

<td align="center" valign="bottom"
<table width="50%" border="0" cellspacing="0" cellpadding="2"
<tr
<td class="table-light" align="left" valign="bottom"<a
href="/frames/history_reset_redirect.asp?FramesPage=/frames/logoff_body_2.as
p" target="_top""<img border="0" src="../pixels/button_logout.gif"
alt="Log Out" TITLE="Log Out" NAME="Log Out"</a</td
<td class="table-light" align="right" valign="bottom"<a href="
" target="_self"<img src="../pixels/button_continue.gif" border="0"
alt="continue" TITLE="Continue" NAME="Continue"</a</td
</tr
</table
</td

There doesn't seem to be a help for the IE object model.. is this correct &
Is there a way to get Intelisnese to work within the the IDE for this?

If there's any other improvements I can make, please feel free to tell me.
Hope you can help.
Dave F.



 
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
Hellllllp Can,t remember pasword chesjak Excel Worksheet Functions 3 April 30th 08 05:07 PM
can i carryover data automatically from page to page and how? JimVT New Users to Excel 3 September 4th 07 05:42 PM
Excell VBA pasword Sparky13 Excel Discussion (Misc queries) 5 June 22nd 07 06:40 PM
How do I automatically insert the user (login name) in Excel? ABlazer Excel Discussion (Misc queries) 1 September 19th 05 02:48 AM
To print multiple selection and how to back VBA module pasword Kamran Khatri Excel Programming 5 September 8th 03 06:17 AM


All times are GMT +1. The time now is 08:27 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"