I am trying to access a web page which uses POST method. Once I enter into the
site, the user has to provide the Login and Password. Once it goes to the main
page , am trying to copy the entire content into excel using VBA.
Here is the scenario:
When I log into mail.yahoo.com, i have to provide the login name and password
then only the user can see their entire list of mails. I want the next page
which is displayed to be in an excel document.
Below is the code which I have tried, but I couldnot get the subsequent page.
In excel still the login page is getting copied.
Can some one help me in how to do this?
Public Sub IETest()
Dim intReadyState As Integer
Dim objie As Object
' Open up Internet Explorer
Set objie = CreateObject("InternetExplorer.Application")
objie.Visible = True
objIE.navigate "http://www.acces.com/access.asp"
Do While Not intReadyState = 4
intReadyState = objie.readystate
Loop
objie.Document.all("frm_userlogin").Value = "20228499"
objie.Document.all("frm_userpassword").Value = "easy06"
objie.Document.all.Item("Login").Click
workbooks.open "http://www.acces.com/access.asp"
End Sub
'the log in page and the content page are same in this case.