Data Not paste

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.

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.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,223,909
Messages
6,175,312
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top