Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to excel vba programing. I have been trying to get href value on a web page using excel vba from almost 2 days now. Please help me out. Since I am new to this I might have made a lot of blunders. Pardon me for that.The scenario is : A particular web page following html designi want to get hef value like www.abc.com, www.xyz.com, www.ybx.com
HTML
<div>
   <span class="One">
   <a href="www.abc.com"> subhash </a>
   </span>
   </div>
   <div>enter code here`
   <div>
   <span class="One">
   <a href="www.xyz.com"> mandar</a>
   </span>
   </div>
   <div>
   <span class="One">
   <a href="www.ybx.com"> Onkar</a>
   </span>
   </div>
Posted
Updated 9-Apr-14 2:31am
v2

1 solution

 
Share this answer
 
Comments
Yogesh_Chavan 10-Apr-14 2:11am    
Thanks Maciej Locs . i am use the following logic . but getting me the some error . is this posiable to my logic thanls in advance

Set internetdata = internet.Document
Set div_result = internetdata.getelementbyclassname("one")
set links= div_result.getelementbytag("a")
For Each l In links_links
Set url = l.ChildNodes.Item
next
Maciej Los 10-Apr-14 2:35am    
Please, read my answer one more time. You are using Regex nowhere!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900