salut a tous,
besoin de votre aide Excel Pratique team .
Voici ce que je veux :
A partir des mots que j insère dans A1 , b1 et c1 ( Xldownup) , la macro envoi ces mots dans google search et liste le 1er lien trouve dans D1 et le 2eme lien dans E1 (xldownUp).
voici le code que j ai trouve mais il fait pas vraiment la job , s'il vous plait des suggestions , Merci.
Sub test()
Dim ie As InternetExplorer
Dim RegEx As RegExp, RegMatch As MatchCollection
Dim MyStr As String
Set ie = New InternetExplorer
Set RegEx = New RegExp
'Search google for cell value
ie.Navigate "http://www.google.com.au/searchhl=en&q=antsmarching.org&meta="
'Loop unitl ie page is fully loaded
Do Until ie.ReadyState = READYSTATE_COMPLETE
Loop
'String to parse google search for an ants reference
With RegEx
.Pattern = Sheets(1).Range(C1).Value
.multiline = True
End With
'return text from google page
MyStr = ie.Document.body.innertext
Set RegMatch = RegEx.Execute(MyStr)
'If a match to our RegExp searchstring is found then launch this page
If RegMatch.Count > 0 Then
ie.Navigate RegMatch(0)
Do Until ie.ReadyState = READYSTATE_COMPLETE
Loop
MsgBox "Loaded Google link"
'show internet explorer
ie.Visible = True
Else
MsgBox "No link found"
End If
Set RegEx = Nothing
Set ie = Nothing
End Sub