Hi everyone,
I am trying to extract data from a website using VBA. This is the web site:
https://gmsip.com.pa
But i can not add my range of data to search bar is there any solution to this problem ?
no i want to add IMO numbers for ship in the excel sheet and VBA run them in website and extract result data to the same sheet as in images below :
https://drive.google.com/drive/folders/1aaUjYz5tCvBrOIcFlWJN9uRbs6tWtLHu?usp=sharing
I am trying to extract data from a website using VBA. This is the web site:
https://gmsip.com.pa
But i can not add my range of data to search bar is there any solution to this problem ?
no i want to add IMO numbers for ship in the excel sheet and VBA run them in website and extract result data to the same sheet as in images below :
https://drive.google.com/drive/folders/1aaUjYz5tCvBrOIcFlWJN9uRbs6tWtLHu?usp=sharing
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = Range("imo").Row And _
Target.Column = Range("imo").Column Then
Dim IE As New InternetExplorer
IE.Visible = True
IE.navigate "https://gmsip.com.pa/asi/inspector/incomingVessels?Search%20vessels...=" & Range("IMO").Value
Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
Dim Doc As HTMLDocumnet
Set Doc = IE.document
Dim sDD As String
sDD = Trim(Doc.getElementsByClassName("prompt ng-pristine ng-valid ng-touched")(0).innerText)
MsgBox sDD
End If
End Sub