Get Data from IE Web Page in VBA Module

IndyTF

New Member
Joined
Oct 23, 2008
Messages
19
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:

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.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
BUMP. I am really curious about this. Let me know if I have left out important information to this question.
 
Upvote 0
Rather than posting the HTML that you think is relevant please post the URL and/or details of your search.:)
 
Upvote 0

Forum statistics

Threads
1,224,852
Messages
6,181,406
Members
453,036
Latest member
Koyaanisqatsi

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