I currently use this macro to open the specific website and login (which I got from this forum and it works perfectly!! - as long as you enable/Reference Microsoft XML v4.0)
Sub WebpageLogin()
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.navigate "https://webpage.com/Login"
ie.Visible = True
Do While ie.Busy And Not ie.readyState = 4
DoEvents
Loop
DoEvents
ie.document.all.Item("txtUserName").Value = "username"
ie.document.all.Item("txtPassword").Value = "password"
ie.document.all.Item("btnLogin").Click
End Sub
However...I would like to write another macro to extract information from this already opened webpage.
I can't "CreateObject" again, because I'd have to login all over again...
How could I start a macro, to reference the already opened webpage?
Once I have logged in...the webpage is a 'search' screen. I have to search different 'cases' for specific bits of information.
So would I continue to use ie.document.all.Item("txtUserName").Value to fill in different fields, like the case number?
Once the 'case' screen is opened... what Code would I use to actually Extract information from the different fields?
Can anyone help?
Thanks!
M
Bookmarks