Hi All,
I have had a good look around this and various other forums which has got me to the current point and would like it if someone could assist me to progress further on this project.
I need to create a VBA script to help monitor the delivery times of goods we send out on courier. Basically at the end of each month we get a list of all the consignments we sent out (connote number, send date, weight, number of cartons, etc). This courier company has the ability to look up the delivery time on their website however to look up each connote manually is a time consuming process.
Now on the website we need to enter the connote number into a search box and press submit. This then loads up information on the shipment including shipping date, destination depot, delivery date etc. The only information I need to pull from the website is the date it was delivered.
Now I am only a small way into this but have an issue where when I press (or it is simulated in the code) the submit button the resulting page opens in a new window (but only the first time the search button is pressed). Resulting times in the new new window this appears to not happen) Therefore the exporting of the page data exports the original page instead of the new page which has the delivery information.
So firstly I either need to know how I can disable the function which is causing it to open in a new window or alternatively find a way to reference the new instance of Internet Explorer.
Once this is done my next real issue is finding a way to reference the last scan date where it states item delivered. Note sometimes the delivery will have multiple scannings done so need to reference the first line where delivery is confirmed. Suspect this may be quite difficult and if so can reference just the first record though this will induce a small margin of error in my reporting that is not ideal.
Lastly how can this date be copied and pasted into a cell in the excel spreadsheet. Which is a matter of parsing the data. Not too sure on how to do this but should hopefully be able to work this part out myself if need be.
Then I just need to make it scroll through all the records in a column looking for this information. I should be right to sort this part out.
A connote you can try if required to see layout etc. of the page is HUN81000. Note this is not a connote which relates to my company but the formatting etc. is exactly the same. Cell A1 in my sample sheet is the first connote number.
Any help people can offer for any of the above queries would be appreciated.
Bookmarks