Follow href in a class

b.hill2387

New Member
Joined
Mar 28, 2012
Messages
38
I am trying to click on several links in a web page. They are all within classes named "addressbox". There are multiple classes named "addressbox". The names of the links are different each time so I cannot name them in the code.

I cannot get the code to click on the second link in each class, but the logic is this:

Code:
[COLOR=blue][FONT=monospace]Sub[/FONT][/COLOR][COLOR=#000000][FONT=monospace] GetData
[/FONT][/COLOR][COLOR=darkgreen][FONT=monospace]'code to go to website (this part is working)
[/FONT][/COLOR][COLOR=blue][FONT=monospace]For Each[/FONT][/COLOR][COLOR=#000000][FONT=monospace] class named "addressbox" [/FONT][/COLOR][COLOR=blue][FONT=monospace]In[/FONT][/COLOR][COLOR=#000000][FONT=monospace] the html document        
Click on the second href link          
[/FONT][/COLOR][COLOR=darkgreen][FONT=monospace]'Extract data (this part is working)[/FONT][/COLOR][COLOR=#000000][FONT=monospace]        
ie.GoBack (this part should work but it [/FONT][/COLOR][COLOR=darkgreen][FONT=monospace]'s untested)
[/FONT][/COLOR][COLOR=blue][FONT=monospace]Next
[/FONT][/COLOR][COLOR=blue][FONT=monospace]End Sub
[/FONT][/COLOR]
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,223,275
Messages
6,171,119
Members
452,381
Latest member
Nova88

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