Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate IE

Status
Not open for further replies.

saundone

Programmer
Feb 15, 2009
1
US
I am working on a db that will update the status of multiple jobs upon a button click. I am having a bit of trouble at this point manipulating the IE page. Here is the specific code I am trying to activate on the page.

<td headers="job">
<form action="/GCA00P00/WIQ2/WINQ120" method="post">
<div>
<input type="hidden" name="M12_SEL_JOBI" value= "05B3032" />
<input type="hidden" name="K01" value="WINQ120" />
<input type="hidden" name="K02" value="98B1897" />
<input type="hidden" name="K03" value="" />
<input type="hidden" name="K04" value="" />
<input type="hidden" name="K05" value="0" />
<input type="hidden" name="K06" value="" />
<input type="hidden" name="DFH_STATE_TOKEN"
value="aletjpba" />
<input type="hidden" name="DFH_MAP_STATE_TOKEN"
value="" />
<input type="submit" value="05B3032" name="Job1"
class="buttolink" />
</div>
</form>
</td>

This paticular page is displayed when a newer job exists.

My specific issue is that on this page, this input type is an inline link. I've tried every method I know in vba to trigger this event.

Here's my code.

Set ElementCol = wScript.Document.getElementsByTagName("input")
' now only have to activate click event for "job1" button to procede
For Each btninput In ElementCol
If btninput.Name = "job1" Then
btninput.click
Exit For
End If
Next btninput
Do Until wScript.Readystate = 4
Loop



I have further code after this that mines data from the next page, however as the click event does not trigger it blows by my readystate check.

Thanks for any help with this matter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top