J'essaie d'entrer l'ID de parcelle: 220022400803300 et j'essaie d'obtenir le résultat, mais même après avoir placé l'ID de parcelle dans la zone de recherche et en cliquant sur le bouton soumettre, aucun résultat n'a été trouvé.Comment soumettre des données de formulaire excel vba
Quelqu'un peut-il s'il vous plaît aidez-moi avec ceci ou s'il y a une meilleure façon de le faire s'il vous plaît faites le moi savoir.
Le site est http://eringcapture.jccal.org/caportal/CAPortal_MainPage.aspx après avoir visité ce site je clique sur Search your Real Property. Click Here.
en bas de page, puis je sélectionne parcel #
bouton radio et mettre le numéro d'identification de parcelle 220022400803300 et cliquez sur le bouton Search
mais il ne retourne aucun résultat trouvé tout faire manuellement donne 1 résultat.
Option Explicit
Option Compare Text
Dim fRD As Long, i As Long, fSR As Long, j As Long
Dim pID As String
Dim IE As SHDocVw.InternetExplorer
Dim Doc As MSHTML.HTMLDocument
Dim urL As String
Dim fnd As Boolean
Sub genOP()
With RD
fRD = .Range("A" & .Rows.Count).End(xlUp).Row
Set IE = New SHDocVw.InternetExplorer
urL = "http://eringcapture.jccal.org/caportal/CAPortal_MainPage.aspx"
For i = 2 To 2
fSR = SR.Range("A" & SR.Rows.Count).End(xlUp).Row + 1
pID = Trim(Format(.Range("A" & i).Value, "0")) ' get PID
If Len(pID) < 8 Then GoTo nextRow
IE.Visible = True
IE.navigate urL
Call WaitForIE
Set Doc = IE.document
Doc.getElementById("Iframe1").contentDocument.getElementById("RealSearchLink").Click
Call WaitForIE
Doc.getElementById("Iframe1").contentDocument.getElementById("SearchByParcel").Checked = True
'SearchByTB
'Delete the first 2 digits from the excel data (parcel ID), e.g. 22002240080330000000 (instead of 0122002240080330000000)
'pID = Right(pID, Len(pID) - 2)
Doc.getElementById("Iframe1").contentDocument.getElementById("SearchText").Value = pID 'Put id in text box
Doc.getElementById("Iframe1").contentDocument.getElementById("Search").Click 'search button
Call WaitForIE
fnd = False
If Trim(Doc.getElementById("Iframe1").contentDocument.getElementById("TotalRecFound").innerText) = "No Records Found." Then
For j = 1 To 6
pID = Left(pID, Len(pID) - 1)
Doc.getElementById("Iframe1").contentDocument.getElementById("SearchText").Value = pID 'Put id in text box
Doc.getElementById("Iframe1").contentDocument.getElementById("Search").Click 'search button
Call WaitForIE
If Trim(Doc.getElementById("Iframe1").contentDocument.getElementById("TotalRecFound").innerText) <> "No Records Found." Then
'Result Found
Stop
fnd = True
Exit For
End If
Next j
Else
'Result Found
Stop
fnd = True
End If
If Not fnd Then
SR.Range("A" & fSR) = "No Records Found"
End If
nextRow:
Next i
IE.Quit
Set IE = Nothing
End With
MsgBox "Process Completed"
End Sub
Sub WaitForIE()
While IE.Busy Or IE.readyState <> READYSTATE_COMPLETE
DoEvents
Wend
Application.Wait Now + TimeValue("00:00:05")
End Sub
Il n'y a pas de champ de recherche sur la page que vous consultez. – sktneer
@sktneer il y a une boîte de recherche si vous cliquez sur rechercher votre propriété réelle au bas de la page – Rohan