1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Sub AfficherPseudo()
Dim IE As InternetExplorer
Dim iePage As HTMLDocument
Dim colElem As IHTMLElementCollection
Dim oElem As HTMLAnchorElement
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.navigate "http://www.developpez.net/forums/showthread.php?t=401924"
Do Until IE.readyState = READYSTATE_COMPLETE
DoEvents
Loop
Set iePage = IE.document
Set colElem = iePage.getElementsByTagName("A")
For Each oElem In colElem
If oElem.className = "bigusername" Then
MsgBox "Cette discussion a été ouverte par " & oElem.innerText
Exit Sub
End If
Next oElem
End Sub |