Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

How to extract data with no Span Class ?

0

I am trying to grab data from a web site  into Excel 2016 by using VBA. but there is no Span class on the site inspect, instead there is the following class that contains the data I need.              <div class="data" style="font-size:28px;">258,133</div> . I get a a compile error saying Expected list separator or ). Any idea how to get it done.

Thanks

Dov

Answer
Discuss

Discussion

Edit your question and post the vba code you are using, I'm thinking its a simple change to make but it depends on your code.
don (rep: 1989) May 28, '20 at 11:49 am
That's the code line where I got the compile error (highlighting "data") when trying to extract the value 258133 
price = html.getElementsByClassName("<div class="data" style="font-size:28px;">258,133</div>").Item(0).innerText
Dibi May 30, '20 at 9:27 am
Add to Discussion



Answer the Question

You must create an account to use the forum. Create an Account or Login