1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
' Penser à
' Rajouter la référence "Microsoft Internet control"
' et Microsoft HTML Object libraru
Dim IE As InternetExplorer
Sub Lance()
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate "http://www.travian.fr/"
While Not IE.ReadyState = READYSTATE_COMPLETE And bAttenteOuverture
DoEvents
Wend
End Sub
Sub RecupCompteur()
Dim MonDoc As HTMLDocument
Dim He As IHTMLElement
Set MonDoc = IE.Document
Set He = MonDoc.getElementById("timer1")
MsgBox He.innerText
End Sub |