PDA

View Full Version : Click On link entitled "Web Timeclock"



mrmmickle1
01-24-2013, 04:23 AM
I am trying to click on a link on a webpage.

There is no ID to identify the link. The only thing in the source code is:

A href="ee-tawebclock.php?clockid=WEB00">Web TimeClock</A

I have found a forum that I believe almost gets me there.

Forum Thread Link (http://www.vbforums.com/showthread.php?695585-RESOLVED-VBA-To-Use-Macro-To-Click-On-Image-Link-in-IE)

The code looks like this but I am unsure what they have set for Dims:


for each ele in ie.document.getelementsbytagname("a")
if instr(ele.innerhtml, "yes.gif") > 0 then ele.click: exit for
next


I would like to loop through all a elements until the innerhtml containing the word Web TimeClock will be found and then clicked. Is there a simple way to modify this code to suit my needs.

Any help would be appreciated.