antibinki
2007-03-27 16:39:46
How do you check checkboxs on web pages using wrappers?
2007-03-27 16:39:46
2007-05-15 11:37:21
Private Sub ClickBullet(ByVal s As String)
Dim i As Long, Caption As String, HTMLElement
On Error GoTo Err_Init
For i = 1 To WebBrowser1.Document.All.length
Set HTMLElement = WebBrowser1.Document.All.Item(i)
If Not (HTMLElement Is Nothing) Then
If StrComp(HTMLElement.tagName, "INPUT", vbTextCompare) = 0 Then
If StrComp(HTMLElement.Type, "radio", vbTextCompare) = 0 Then
Caption = HTMLElement.Value
If (Caption Like s) Or (StrComp(Caption, s, vbTextCompare) = 0) Then
HTMLElement.Click
Exit For
End If
End If
End If
End If
Next i
Exit Sub
Err_Init:
MsgBox Err.Number & " - " & Err.Description, vbCritical
Resume Next
End Sub