1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| Sub import_evalP_web()
Dim objie As InternetExplorer
Dim ele As Object
Dim y As Integer
Dim htmlselectElem As HTMLGenericElement
Dim Nb As Variant
Dim x As Variant
Dim htmlProfil As HTMLGenericElement
Dim g
Dim nbLignes As Integer
Set objie = New InternetExplorer
objie.Visible = True
Dim Nb1 As Double
objie.navigate "https://forms.zohopublic.com/tcbfourneyron/report/EvalPratique2/reportperma/O6C4jFMFEfvI91EsbntlysOoW4tZraFL9EYUvAhza4A"
Do While objie.Busy = True Or objie.readyState <> 4: DoEvents: Loop
Set htmlProfil = objie.document.getElementById("total")
'MsgBox htmlProfil
'je cherche à connaitre en focntion du nombre de réponse le nombre de page de 10 à dérouler
Nb = htmlProfil.innerText 'Application.WorksheetFunction.RoundUp("htmlProfil.innerText / 10", 0)
MsgBox Nb
Nb = htmlProfil.Value
x = Nb / 10
Nb1 = Application.WorksheetFunction.RoundUp(x, 0)
'je cherchais à avoir un nombre entier pour dérouler le bon nombre de page
'Nb1 = -Int(-x + 0.1)
If Nb1 = 0 Then
Nb1 = 1
Else: Nb1 = Nb1 '-Int(-Nb + 0.1)
End If |
Partager