Public
Sub
login()
Dim
ie
As
InternetExplorer
Dim
html
As
HTMLDocument
Dim
IeApp
As
InternetExplorer
Dim
Link
As
Object
Dim
ieDoc
As
Object
Dim
ieAnchors
As
Object
Dim
Anchor
As
Object
Dim
ElementCol
As
Object
Dim
Element
As
HTMLLinkElement
Dim
objIE
As
SHDocVw.InternetExplorer
Dim
htmlDoc
As
MSHTML.HTMLDocument
Dim
htmlInput
As
MSHTML.HTMLInputElement
Dim
htmlColl
As
MSHTML.IHTMLElementCollection
Dim
login
As
Object
Set
objIE =
New
SHDocVw.InternetExplorer
With
objIE.navigate(
"MEINE WEBSITE"
)
.Visible = 1
Do
While
.readyState <> 4: DoEvents:
Loop
Application.Wait (Now + TimeValue(
"0:00:02"
))
Set
htmlDoc = .document
Set
htmlColl = htmlDoc.getElementsByTagName(
"INPUT"
)
Do
While
htmlDoc.readyState <>
"complete"
: DoEvents:
Loop
For
Each
htmlInput
In
htmlColl
If
htmlInput.Name =
"email"
Then
htmlInput.value =
"MEINE EMAIL"
Else
If
htmlInput.Name =
"passwort"
Then
htmlInput.value =
"MEIN PASSWORT"
End
If
End
If
Next
htmlInput
objIE.document.forms(0).submit
Do
While
.readyState <> 4: DoEvents:
Loop
Application.Wait (Now + TimeValue(
"0:00:02"
))
Set
htmlDoc =
Nothing
Set
objIE =
Nothing
End
With
End
Sub