Hello all, I’m trying to use vba to retrieve data from the following web site;
https://www.smithbarney.com/cgi-bin/login/login.cgi
I’m using Excel 2007 and the code I have so far is…
I went to the web page and clicked view source, but couldn’t determine which login and password I should put in the code. I think the problem is username and password not matching the source code.
Once I login to the web page I would like to import a page, then logout and close the page.
Thanks, Any help would be most appreciated.
https://www.smithbarney.com/cgi-bin/login/login.cgi
I’m using Excel 2007 and the code I have so far is…
Rich (BB code):
Sub WebLogin()
Dim a As String
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.navigate "https://www.smithbarney.com/cgi-bin/login/login.cgi"
Do Until .readyState = 4
DoEvents
Loop
.document.all.Item("username").Value = "MyUserId"
.document.all.Item("password").Value = "MyPassword"
.document.forms(0).submit
End With
End Sub
Once I login to the web page I would like to import a page, then logout and close the page.
Thanks, Any help would be most appreciated.