Hi All,
I have a list on a webpage:
Coy 1
Coy 2
Coy 3
and I want Excel to "click" on Coy 3 and load the corresponding page.
With the underlying webpage code being:
Using:
I am able to cycle through:
but what I would like to be able to do is cycle through:
Coy 1
Coy 2
Coy 3
and when it finds Coy 3, load the webpage /gdfd/Do/Something/4Hte9
I just can't work out where I am going wrong.
Any assistance would be greatly appreciated.
Cheers
I have a list on a webpage:
Coy 1
Coy 2
Coy 3
and I want Excel to "click" on Coy 3 and load the corresponding page.
With the underlying webpage code being:
Code:
<a href="/gdfd/Do/Something/FTRED" class="name" data-automationid="dashboard">Coy1</a>
<a href="/gdfd/Do/Something/hdYnd" class="name" data-automationid="dashboard">Coy2</a>
<a href="/gdfd/Do/Something/4Hte9" class="name" data-automationid="dashboard">Coy3</a>
Using:
Code:
For Each l In IE.document.getElementsByClassName("name")
If l.ClassName = "Coy3" Then
l.Click
End If
Next
Code:
/gdfd/Do/Something/FTRED
/gdfd/Do/Something/hdYnd
/gdfd/Do/Something/4Hte9
but what I would like to be able to do is cycle through:
Coy 1
Coy 2
Coy 3
and when it finds Coy 3, load the webpage /gdfd/Do/Something/4Hte9
I just can't work out where I am going wrong.
Any assistance would be greatly appreciated.
Cheers