Uee this as the login url and it will work
Here is your updated code.
Sub LoginToURL()
Dim ie As Object, iebody As String, strURL As String, strUsername As String, strPassword As String
Set ie = CreateObject("InternetExplorer.Application")
strURL = "https://www.costar.com/PortalPublic/SSL/Login.aspx?c=30&LangType=1033"
strUsername = "Username here"
strPassword = "password here"
ie.Navigate strURL
'Wait until page is loaded.
While ie.ReadyState < 4 ' READYSTATE_COMPLETE = 4
DoEvents
Wend
ie.Visible = True
ie.Document.All("username").Value = strUsername
ie.Document.All("password").Value = strPassword
ie.Document.All("oLoginButton").Click
'Wait until page is loaded.
While ie.ReadyState < 4 ' READYSTATE_COMPLETE = 4
DoEvents
Wend
Application.Wait (Now + TimeValue("0:00:05"))
iebody = ie.Document.body.innerhtml
If InStr(iebody, "The information you entered is invalid.") <> 0 Then
MsgBox "Login failed!", vbCritical + vbOKOnly
Else
MsgBox "Login successful!", vbInformation + vbOKOnly
End If
ie.Quit
Set ie = Nothing
End Sub
Bookmarks