Extraction données sur google VBA
Bonjour,
Je suis actuellement en stage et novice en vba. J'épluche les tutos et les forums depuis plusieurs semaines en espérant avancer mon projet, mais en vain car mon code ne fonctionne pas.
Je dois créer un code vba me permettant, à l'aide du nom + prénom d'une personne contenus dans 2 cellules excel, extraire directement (à l'aide d'un bouton) les informations disponibles de la personne sur linkedIn, affichées sur la première page Google lorsqu'on tape ces champs dans une barre de recherche google. (Ex: Etudes, poste actuel, région).
Si jamais l'un d'entre vous pouvait me débloquer, ce serait vraiment super
Merci d'avance
Novive
Sub test()
Dim eRow As Long
Dim Ele As Object
Set sht = Sheets("Feuil1")
RowCount = 1
sht.Range("A" & RowCount) = "Informations"
'sht.Range("B" & RowCount) = "Lien"
eRow = Feuil1.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Set objIE = CreateObject("InternetExplorer.Application")
my = InputBox("Entrer un nom et un prénom ")
With objIE
.Visible = True
.navigate "
"
Do While .Busy Or _
.readyState <> 4
DoEvents
Loop
Set what = .document.getElementsByTagName("slp f")
what.Items(0).Value = my ''ici j'ai une erreur
.document.getElementById("_fZl").Click
Do While .Busy Or _
.readyState <> 4
DoEvents
Loop
For Each Ele In .document.all
Select Case Ele.classname
Case "rc"
RowCount = RowCount + 1
Case "slp f"
sht.Range("A" & RowCount) = Ele.innerText
Case "f kv _SWb"
sht.Range("B" & RowCount) = Ele.innerText
End Select
Next Ele
End With
Macro1
Set objIE = Nothing
End Sub
'''''''''''''''''''''''''''''''''''''''''
et la marco1 :
Sub Macro1()
Columns("A:B").Select
Selection.Columns.AutoFit
With Selection
.VerticalAlignment = xlTop
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
End With
Range("B1").Select
Columns("B:B").ColumnWidth = 50
Columns("A:B").Select
Selection.Rows.AutoFit
End Sub