Greetings,
I wonder if anyone can help me, I am not really that experienced with macros and vba most of what I been able to acomplish thus far is via youtube tutorials.
I am trying to create a macro to open a IE window and load up a webpage and then log in to it however I keep getting an automation error with unspecified error underneath
This is the code I have for the macro
Any help anyone can offer would be greatly appreciated
I wonder if anyone can help me, I am not really that experienced with macros and vba most of what I been able to acomplish thus far is via youtube tutorials.
I am trying to create a macro to open a IE window and load up a webpage and then log in to it however I keep getting an automation error with unspecified error underneath
This is the code I have for the macro
Code:
Sub FUNC_LOGIN_KRONOS()
Dim appIE As InternetExplorerMedium
Set appIE = Nothing
Dim objElement As Object
Dim objCollection As Object
Set appIE = New InternetExplorerMedium
sURL = "https://kronos-emea.dhl.com/wfc/logon/"
With appIE
.navigate sURL
.Visible = True
End With
Do While appIE.Busy Or appIE.ReadyState <> 4
DoEvents
Loop
appIE.Document.getElementById("username").Value = _
Sheets("Setup").Range("I12").Value
appIE.Document.getElementById("password").Value = _
Sheets("Setup").Range("I14").Value
End Sub
Any help anyone can offer would be greatly appreciated