I have a sheet with masterbills (airfreight) in columns & wants these to be copied to Internet Explorer, example range below only from G6 to G8
you can put "A" in G6, "B" in G7, "C" in G8 to try..
I want to open the same webpage with the contents of G6, open new tab with contents of G7 ....
My code :
Code
- Dim IE As Object
- Dim MyURL As String
- Set IE = CreateObject("InternetExplorer.Application")
- MyURL = "https://www.track-trace.com/aircargo"
- With IE
- .Top = 50
- .Left = 1000
- .Height = 700
- .Width = 900
- End With
- IE.Navigate MyURL
- 'IE.Visible = True
- While IE.Busy
- DoEvents
- Wend
- Dim str As String
- Dim arr() As Variant
- Dim tableRow As Integer
- Dim tableCol As Integer
- arr = Range("G6:G8")
- For tableCol = LBound(arr, 2) To UBound(arr, 2)
- For tableRow = LBound(arr) To UBound(arr)
- str = arr(tableRow, tableCol) & vbTab
- IE.Visible = True
- With IE.document
- IE.document.Title = str
- IE.Navigate MyURL, CLng(2048)
- While IE.Busy
- DoEvents
- Wend
- .getElementById("number").innerText = str
- End With
- Next tableRow
- Next tableCol
This opens 4 tabs of Internet Explorer & it copies the contents of the cells, but, the contents are always pasted in the first opened tab iso each tab
How can i resolve this & is it possible to click on 'track direct' ?
Also how to select the range from G6 till the last non-blank cell ?
Kind regards,