title: How to click on a hyperlink on a web page using vba excel?
body: <p>I am new to excel vba programing. I have been trying to click on a hyperlink on a web page using excel vba from almost 3 days now. Please help me out. Since I am new to this I might have made a lot of blunders. Pardon me for that.</p>
  
  <p>The scenario is :
  A particular web page has a table with first column as an icon, second column is a hyperlink and a few more columns with some description about the hyperlink.</p>
  
  <p>Now, I want to click on the hyperlink in the first row (second column).
  When we hover over the icon present in the same row(in first column) the same hyperlink is displayed.</p>
  
  <p>This webpage is dynamic, hence the table keeps changing. Actually the table is a result of a search criteria entered.</p>
  
  <p>I have written a lot of codes from three days.
  This is the latest one thats not working:</p>
  
  <p>'Get element id for the row</p>
  
  <pre><code>With elementid = ieApp.document.all.Item("abcrow1")
     'checking for details with tagname as "a"
     Set tagname = ieApp.document.getElementByTagName("a")
  
     For Each tag In tagname
       'Get value of the href
       hrefvalue = tag.href.value
     If Not IsNull(hrefvalue) Then
       If hrefvalue &lt;&gt; "javascript:void(0);" Then  'this href is usedto describe the icon
          hrefvalue = ieApp.document.href.value
  
          hrefvalue = "https://www.secur.com" &amp; hrefvalue
          ieApp.Navigate hrefvalue
          Exit For
       End If
     End IF
  Next tag
  End With
  </code></pre>
  
  <p>The HTML script is as follows:</p>
  
  <pre><code> &lt;tr id = "abcrow1" class="e1"&gt;
     &lt;td class = "icon"&gt;&lt;/td&gt;
     &lt;td&gt;&lt;ul class="xyz" id="link"&gt;
         &lt;li&gt;&lt;a href = "javascript:void(0);"&gt;&lt;img src="/nnn.gif" border = 0 alt = "info"         &lt;/a&gt;
         &lt;ul&gt;
         &lt;li&gt;&lt;a onclick ="return cursorWait(this);" href = "/xyz/lmo"&gt;DetailOfRow1&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;
     &lt;td style = "text-align:left"&gt;&lt;aonclick="return cursorWait(this);" href = "/xyz/lmo"&gt;DetailOfRow1&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p>Please help me out. Thank you.</p>