Here is the HTML:
Here is the code I have:
Now, I've placed that code in a command button. If I click it once, nothing happens. If I click it twice, it works. I'm baffled. Any ideas?
Code:
<input type="image" value="Say It!" class="sayButton" name="SayButton" src="images/tts_oddcast_sayit.gif" onClick="DoAction(this.form.textToSay.value, this.form.effect.value);" />
Code:
Dim Item As Variant
Dim strValue As String
Dim I As Long
For Each Item In Web1.Document.All
I = I + 1
strValue = ""
On Error Resume Next
strValue = Item.Name & Item.Value
On Error GoTo 0
If strValue = "SayButtonSay It!" Then
strValue = ""
Item.Click
End If
Next