Hi, i'm new to this so pls bear with me if i seem a little dumb :-)

i have a intranet page were i need to login, (achived this woo-hoo)
after the login i need to search the page for a string of text, if the
text is there then i need to end the sub else if the string is not
there i need to download a file and save it to a disk.
the log in process involves me having to post data to move to the next
screen, 1st page asks for user name and pwd, 2nd page i need to confim
i am authorised to use the site by clicking yes button and final login
page requests me to continue to the main page, then i select a link to
the reports page and heres were i'm stuck, i need to search this page
to check if the reports are complete if not then do nothing else
download 2 reports, this also means i need to wait for internet
explorer to finish the 1st download before starting the next (have no
clue how to do this) any help would be greatly appreciated. thanks and
kind regards

heres the code so far.

Sub A_LoginToBBPlatform()
Dim ie As Object

Dim sURL As String
Dim tURL As String
Dim rURL As String
Dim uURL As String
Dim vHeader As String
Dim bytPostData() As Byte
Dim bytPostData1() As Byte
Dim bytPostData2() As Byte
Dim rsUsername As String
Dim rsPassword As String

rsUsername = "801753228"
rsPassword = "714829"

Set ie = CreateObject("InternetExplorer.Application")

sURL = "http://someurl/pincheck.cfm"
tURL = "http://someurl/setusercookies.cfm"
rURL = "http://someurl/mainmenu.cfm"
uURL = "http://someurl/reports.cfm?RequestTimeout=120"

bytPostData = "EIN=1234&PIN=1234"
bytPostData1 = "AAN=1234&EIN=1234&PIN=1234"
bytPostData2 = ""

bytPostData = StrConv(bytPostData, vbFromUnicode)
bytPostData1 = StrConv(bytPostData1, vbFromUnicode)
bytPostData2 = StrConv(bytPostData1, vbFromUnicode)
sHeader = "Content-Type: " & "application/x-www-form-urlencoded " &
vbCrLf

With ie
.Navigate sURL, 0, " self", bytPostData, sHeader
Do While ie.Busy Or ie.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
.Navigate tURL, 0, " self", bytPostData1, sHeader
Do While ie.Busy Or ie.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
.Navigate rURL, 0, " self", bytPostData2, sHeader
Do While ie.Busy Or ie.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
.Navigate uURL, 0, " self"
Do While ie.Busy Or ie.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
End With

Set ie = Nothing
End Sub