Dim ie As InternetExplorer
Dim C
Dim Value1 As Boolean, ieForm
Dim Value2 As String, MyLogin As String
redo:
Value1= Application.InputBox("Please enter value 1", "Ecaytrade username", Default:="Value1", Type:=2)
Value2 = Application.InputBox("Please enter value 2", "Ecaytrade Password", Default:="Value2", Type:=2)
If Value1 = "" Or Value2= "" Then GoTo redo
Set ie = New InternetExplorer
ie.Visible = True
ie.Navigate "http://website address"
'Loop until ie page is fully loaded
Do Until ie.ReadyState = READYSTATE_COMPLETE
Loop
For Each ieForm In ie.Document.forms
If InStr(ieForm.innertext, "Data Entry") <> 0 Then
ULogin = True
'enter details
ieForm(1).Value = Value1
ieForm(2).Value = Value2
ieForm.submit
Exit For
Else
End If
Next
Set ie = Nothing
End Sub
Bookmarks