I would like to compare 2 values and click the checkbox inside the Tr element but for now i have:
Well after this what i have to say is ,
In the
Code:
Public Sub Worksheet_SelectionChange(ByVal Target As Range)
EventSelect.Caption = ActiveCell.Value
IpSource.Caption = Cells(ActiveCell.Row, ActiveCell.Column + 1)
DestinationIP.Caption = Cells(ActiveCell.Row, ActiveCell.Column + 2)
End Sub
Sub Extract_TR_text()
Dim URL As String
Dim IE As InternetExplorer
Dim HTMLdoc As HTMLDocument
Dim TRelements As IHTMLElementCollection
Dim TRelement As HTMLTableCell
Dim Chkb0x As IHTMLElementCollection
URL = "localhost/events/index.cgi"
Set IE = New InternetExplorer
With IE
.navigate URL
.Visible = True
While .Busy Or .readyState <> READYSTATE_COMPLETE: DoEvents: Wend
Set HTMLdoc = .document
End With
Set TRelements = HTMLdoc.getElementsByTagName("TR")
For Each TRelement In TRelements
MsgBox TRelement.innerText
Next
IE.Quit
Set IE = Nothing
End Sub
.i want to compare the value on the TRelement with the EventSelect.Caption
In the
And in thefirst part i would like to just msg box the TRelement.innerText if it is equal to the string in EventSelect.Caption.
2 part maybe if possible , search in the TR.Element and press the checkbox (checkbox.Select or Click)there is only 1 checkbox per TR.