Hi,
I've looked throughout the archives and I can't find a solution to my only problem (so far) with the WebBrowser.
I have a form (which I don't own) that I need to push a button on. I know the syntax is:
WB.Document.All("ButtonName"
.Click
But the problem is, there is no name for the button.
Here's the HTML for the button:
<TD VALIGN='top'>
<INPUT type='button' OnClick='IN_CHECK()' value='Start' style="FONT-SIZE: 24px; HEIGHT: 40px; WIDTH: 120px">
</TD>
I've tried WB.Document.All("Start"
and that's a no go. I took all the source and entered it into Front page and used the preview there to give me all the available details on the button (In case I missed something) but there really is no name on any of the buttons on ths form (there are 4)
So the only solution I can think of is to grab the collection of buttons and look at the "Value" and find the button I want. But since there is a supreme lack of literature on the use of this I can't seem to find how to reference that collection.
I've used this to get ahold of the tags (hyperlinks) so I'm thinking this will work if I can just get it to look at the buttons.
Dim objElements As Object, i As Integer
Dim objElement As Object
Dim objToClick As Object
Set objToClick = Nothing
Set objElements = WB.Document.All.tags("Value"
For Each objElement In objElements
If LCase(objElement.innerText) Like "*start*" Then
''if LCase(objElement.outerHtml) Like "*somehtml*" then
Set objToClick = objElement
Exit For
End If
Next
If Not objToClick Is Nothing Then objToClick.Click
Any and all sugestions are appreciated.
Kyle
I've looked throughout the archives and I can't find a solution to my only problem (so far) with the WebBrowser.
I have a form (which I don't own) that I need to push a button on. I know the syntax is:
WB.Document.All("ButtonName"
But the problem is, there is no name for the button.
Here's the HTML for the button:
<TD VALIGN='top'>
<INPUT type='button' OnClick='IN_CHECK()' value='Start' style="FONT-SIZE: 24px; HEIGHT: 40px; WIDTH: 120px">
</TD>
I've tried WB.Document.All("Start"
So the only solution I can think of is to grab the collection of buttons and look at the "Value" and find the button I want. But since there is a supreme lack of literature on the use of this I can't seem to find how to reference that collection.
I've used this to get ahold of the tags (hyperlinks) so I'm thinking this will work if I can just get it to look at the buttons.
Dim objElements As Object, i As Integer
Dim objElement As Object
Dim objToClick As Object
Set objToClick = Nothing
Set objElements = WB.Document.All.tags("Value"
For Each objElement In objElements
If LCase(objElement.innerText) Like "*start*" Then
''if LCase(objElement.outerHtml) Like "*somehtml*" then
Set objToClick = objElement
Exit For
End If
Next
If Not objToClick Is Nothing Then objToClick.Click
Any and all sugestions are appreciated.
Kyle