ok, i will give you the code,
first let me tell you how it works, it opens the webpage taking info from my excel sheet1 and search the page with it, then it will copy the shipping info into my excel on sheet2,
here it is.
Sub GetTheShipping()
Dim I As Long
Dim ie As Object
Dim objElement As Object
Dim objCollection As Object
Dim btnInput As Object ' MSHTML.HTMLInputElement
Dim btntype As Object
Dim btn As Object
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Dim xlSheet2 As Excel.Worksheet
Dim oRng As Range
Dim final As Range
Dim bXStarted As Boolean
Const strPath As String = "Test.xlsx"
Const sFilePath As String = "C:\Users\xxx\Desktop\"
On Error Resume Next
Set xlApp = GetObject(, "Excel.Application")
If Err <> 0 Then
Application.StatusBar = "Please wait while Excel source is opened ... "
Set xlApp = CreateObject("Excel.Application")
bXStarted = True
End If
'Open the workbook
Application.Wait (Now + TimeValue("0:00:02"))
Set xlWB = xlApp.Workbooks.Open(sFilePath & strPath)
Set xlSheet = xlWB.Sheets("Sheet1")
Set xlSheet2 = xlWB.Sheets("Sheet2")
Set oRng = xlSheet.Range("A2")
Set final = xlSheet2.Range("A1")
On Error GoTo 0
'this is the page where to search for that particular info'
web="https://sellercentral.amazon.com/orders/search"
Set ie = CreateObject("InternetExplorer.Application")
' You can uncoment Next line To see form results
ie.Visible = True
' Send the form data To URL As POST binary request
ie.Navigate web
' Statusbar
Application.StatusBar = web & " is loading. Please wait..."
' Wait while IE loading...
Do While ie.Busy
Application.Wait DateAdd("s", 1, Now)
Loop
Application.Wait (Now + TimeValue("0:00:04"))
Application.StatusBar = "Search form submission. Please wait..."
Set objCollection = ie.Document.getElementsByTagName("input")
I = 0
While I < objCollection.Length
If objCollection(I).Name = "searchKeyword" Then
' Set text for search
objCollection(I).Value = oRng
End If
I = I + 1
Wend
Set btn = ie.Document.getElementsByTagName("button")
I = 0
While I < btn.Length
If btn(I).Name = "Search" Then
Set objElement = btn(I)
objElement.Click ' click button to search
End If
I = I + 1
Wend
' Wait while IE re-loading...
Do While ie.Busy
Application.Wait DateAdd("s", 1, Now)
Loop
Application.Wait (Now + TimeValue("0:00:04"))
ie.ExecWB 17, 0
ie.ExecWB 12, 0
final.PasteSpecial xlPasteValues
' Clean up
Set ie = Nothing
Set objElement = Nothing
Set objCollection = Nothing
Application.StatusBar = ""
End Sub