vba html click not working
<p>I am getting URLs from charts that are generated from a web page.  It loops through stocks, and then creates the charts.  I have the whole process automated except for one button.</p>

<p>On the first stock, my code works great, but it doesn't work after that.</p>

<p>Here is the HTML...</p>

<pre><code>&lt;tr data-menuitem="save" style="border: 1px solid rgb(174, 185, 197); height: 32px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Arial; background-color: rgba(179, 213, 253, 0);"&gt;
&lt;td valign="middle" align="center" title="Save Chart" style="cursor: default; border: none;"&gt;  &lt;img width="24" height="24" class="icon" style="display:block" src="/chartnotes/img/unsaved.gif"&gt;
&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>And here is my vba trying to click the button...</p>

<pre><code>        Set IEDoc = IE.Document.getElementsByTagName("td")
        If IEDoc(258).getAttribute("Title") = "Save Chart" Then
            IEDoc(258).Click
        ElseIf IEDoc(114).getAttribute("Title") = "Save Chart" Then
            IEDoc(114).Click
        Else
            Stop
        End If
</code></pre>

<p>I am sure that it is finding the correct element, because it runs the code for IEDoc(258).Click each time.  But the actual action of the button only happens on the first pass.</p>

<p>Thoughts?</p>