What exactly did you try?
What exactly did you try?
If posting code please use code tags, see here.
I tried your guys' suggestions. I suppose searching for how to use VBA with javascript code would do the trick, as that seems to be what the site is using for its text fields.
![]()
Sub ExpenseReportLogin() If IsEmpty(Range("A1")) Then Range("E1").Value = "Error: Fill In the username field!" End If If IsEmpty(Range("A2")) Then Range("E2").Value = "Error: Fill In the password field!" End If Dim MyHTML_Element As IHTMLElement Dim MyURL As String On Error GoTo Err_Clear MyURL = "bigURL" Set MyBrowser = New InternetExplorer MyBrowser.Silent = True MyBrowser.navigate MyURL MyBrowser.Visible = True Do Loop Until MyBrowser.readyState = READYSTATE_COMPLETE Set HTMLdoc = MyBrowser.document ' get reference to first form on page 'Set frm = HTMLdoc.forms(1) 'frm.all("USER").Value = "USER" 'frm.all("PASSWORD").Value = "PWORD" 'frm.submit HTMLdoc.Login.Password.Value = "MyAwesomePassword" 'HTMLdoc.getElementsByName("USER")(0).Value = "USRNAME" 'HTMLdoc.all.Password.Value = Range("A2") 'Range("A1:A2").ClearContents 'For Each MyHTML_Element In HTMLdoc.getElementsByTagName("input") 'If MyHTML_Element.Type = "submit" Then MyHTML_Element.Click: Exit For 'Next Err_Clear: If Err <> 0 Then Err.Clear Resume Next End If End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks