through vba - I need to go to the page , then select option "Hawb/direct awb no." in Track by drop down, enter a cell copied from excel into "Number" field and then click "submit" button.
how can i do it? I am using excel 10 and IE 10. I tried variety of commands like below but no success :(
ie.document.getElementById("ctl00_contentPlaceHolderRoot_cboTrackBy").Focus
ie.document.getElementById("ctl00_contentPlaceHolderRoot_cboTrackBy").Click
ie.document.getElementById("ctl00_contentPlaceHolderRoot_cboTrackBy").Value = "aw"
ie.document.getElementById("ctl00_contentPlaceHolderRoot_cboTrackBy").FireEvent ("onchange")
ie.document.getElementById("ctl00_contentPlaceHolderRoot_txtTrackBy").Value = b 'ctl00_contentPlaceHolderRoot_linkButtonSubmit
ie.document.getElementById("ctl00_contentPlaceHolderRoot_linkButtonSubmit")(0).Click
update:
I followed ron's answer below. I want to copy tables that i get once ron's code finishes it's processing. I used tracking number - PEN91227308
I tried below commands. But the data that it copies is not in a table format. When i paste it in excel entire row appears on a single cell. How could i convert that data into table format as on the webpage?
Dim clipboard As MSForms.DataObject
Set clipboard = New MSForms.DataObject
clipboard.PutInClipboard
clipboard.SetText Doc.getElementById("ctl00_contentPlaceHolderRoot_grdVwHistory").innerHTML