vijaychennai
Board Regular
- Joined
- Dec 7, 2009
- Messages
- 239
Hello all,
Good day. I am using the below code.
Macro working fine but Range B1 is not working.
I want to paste the status of tracking.
Please help expert.
Good day. I am using the below code.
Macro working fine but Range B1 is not working.
I want to paste the status of tracking.
Code:
Sub Basics_Of_Web_Macro()
Dim myIE As Object
Dim myIEDoc As Object
'Start Internet Explorer
Set myIE = CreateObject("InternetExplorer.Application")
'if you want to see the window set this to True
myIE.Visible = True
'Now we open the page we'd like to use as a source for information
' myIE.Navigate "http://www.amazon.com/gp/product/B00J34YO92/ref=s9_ri_gw_g421_i1?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=desktop-3&pf_rd_r=090F56JZ7KPTB48JWMDW&pf_rd_t=36701&pf_rd_p=2090151042&pf_rd_i=desktop"
myIE.Navigate "https://www.fedex.com/apps/fedextrack/index.html?tracknumbers=440039683225&cntry_code=us#"
'We wait for the Explorer to actually open the page and finish loading
While myIE.Busy
DoEvents
Wend
'Now lets read the HTML content of the page
Set myIEDoc = myIE.document
'Time to grab the information we want
'We'll start with the Title of the page
Range("A1") = myIEDoc.Title
'Then we'll get something from teh inner page content by using the ID
'Range("B1") = myIEDoc.getElementById("priceblock_ourprice").innertext
Range("B1") = myIEDoc.getElementById("redesignStatusChevronTVC tank-results-item__data-label-large tank-text-center statusChevron_key_status").innertext
End Sub
Please help expert.