Ok... So, I understand the very basics (and only the basics) of web automation through VBA. I have a question about how to pull data from off the web page though once VBA has it loaded. Basically, I am trying to get information about an Amazon search result once it has loaded. Here is an example of the source code I am talking about:
I would like to pull the following information back into my VBA Code to be used by the rest of my module (I've shown the result I'd like to get given the above source code for the site):
Product Title as a String: "VBA for Modelers: Developing Decision Support Systems Using Microsoft® Excel (with VBA Program CD-ROM)"
Product Brand as a String: "by S. Christian Albright"
New Price: "$88.22"
Used Price: "$64.98"
I've been researching about GetElementsbyName and ID and TagName. Also read a bit about .innertext. I am just getting lost in this.
Can anyone help me out? I am running Excel 2002/3 but would like it to be able to work on 2007.
Let me know if you need more information.
HTML:
<div class=listView>
<div class="result firstResultRow lastResultRow" id="result_0">
<div id="srNum_0" class="number">1.</div>
<div class="productTitle"><a href="http://www.amazon.com/VBA-Modelers-Developing-Decision-Microsoft%C2%AE/dp/0495106836/ref=sr_1_1?ie=UTF8&s=books&qid=1253631548&sr=1-1"> VBA for Modelers: Developing Decision Support Systems Using Microsoft® Excel (with VBA Program CD-ROM)</a> <span class="ptBrand">by S. Christian Albright</span><span class="binding"> (<span class="format">Paperback</span> - Jan 3, 2006)</span></div>
<div class="newPrice"><a href="http://www.amazon.com/VBA-Modelers-Developing-Decision-Microsoft%C2%AE/dp/0495106836/ref=sr_1_1?ie=UTF8&s=books&qid=1253631548&sr=1-1">Buy new</a>: <strike>$109.95</strike> <span>$88.22</span></div>
<div class="usedPrice"><a href="http://www.amazon.com/gp/offer-listing/0495106836/ref=sr_1_olp_1?ie=UTF8&s=books&qid=1253631548&sr=1-1">27 Used & new</a> from <span>$64.98</span></div>
<div class="fastTrack"><span class="getItBy">Get it by <span class="deliveryDate">Wednesday, Sep 23</span></span> if you order in the next <span class="timeLeft">8 hours</span> and choose one-day shipping.</div>
I would like to pull the following information back into my VBA Code to be used by the rest of my module (I've shown the result I'd like to get given the above source code for the site):
Product Title as a String: "VBA for Modelers: Developing Decision Support Systems Using Microsoft® Excel (with VBA Program CD-ROM)"
Product Brand as a String: "by S. Christian Albright"
New Price: "$88.22"
Used Price: "$64.98"
I've been researching about GetElementsbyName and ID and TagName. Also read a bit about .innertext. I am just getting lost in this.
Can anyone help me out? I am running Excel 2002/3 but would like it to be able to work on 2007.
Let me know if you need more information.