Mustafa
Here's a sub that I used to get box scores from a table in a web page. It
loops through all the elements in the web page and when it finds a table
whose first cell begins with "PLAYER", it gets certain values from the
table. If you know how to get directly to the table, you probably won't
need to loop, but all the objects and properties you need are here. You
need to set a reference to Microsoft Internet Controls.
Sub test()
'
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser
'/webbrowser/reference/properties/locationurl.asp
Dim ie As InternetExplorer
Dim doc As Object, Tbl As Object
Dim DocElemsCnt As Long, BoxScoreCnt As Long, RwLen As Long
Dim TbRw As Object
Sheet1.Cells.ClearContents
Set ie = New InternetExplorer
ie.Visible = True
ie.Navigate "
http://www.sportsline.com/" & _
"collegebasketball/gamecenter/recap/" & _
"NCAAB_20030405_SYR@TX"
Do
Loop Until ie.Busy = False
Set doc = ie.Document
BoxScoreCnt = 1
For DocElemsCnt = 0 To doc.all.Length - 1
If doc.all.Item(DocElemsCnt).tagname = "TABLE" Then
Set Tbl = doc.all.Item(DocElemsCnt)
If Left(Tbl.innertext, 6) = "PLAYER" Then
For RwLen = 0 To Tbl.Rows.Length - 1
Cells(65536, 1).End(xlUp).Offset(1, 0).Value = _
Tbl.Rows(RwLen).Cells(0).innertext
Cells(65536, 1).End(xlUp).Offset(1, 1).Value = _
Tbl.Rows(RwLen).Cells _
(Tbl.Rows(RwLen).Cells.Length - 1).innertext
Next RwLen
'Debug.Print k
'Cells(j, 1).Value = Tbl.innertext
BoxScoreCnt = BoxScoreCnt + 1
End If
End If
Next DocElemsCnt
ie.Quit
End Sub