M
Maxi
Thank you so much
If you need a general-purpose function then maybe something like this
(untested)
example useage:
debug.print GetValue(IE.document, "Report Owner")
'********************************
'Find text in the first cell of a table row and
' return the text in the next cell to the right
Function GetValue(doc As Object, sValueType As String) As String
Dim t As Object, retVal As String
Dim r As Integer
retVal = ""
For Each t In doc.getElementsByTagName("TABLE")
For r = 0 To t.Rows.Length - 1
If t.Rows(r).Cells(0).innerText = sValueType Then
retVal = t.Rows(r).Cells(1).innerText
Exit For
End If
Next r
If retVal <> "" Then Exit For
Next t
GetValue = retVal
End Function
'********************************
Note you don't need to copy the value to the clipboard:
Activesheet.range("A1").value = GetValue(IE.document, "Report Owner")
Tim