View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Maxi[_2_] Maxi[_2_] is offline
external usenet poster
 
Posts: 94
Default Importing values from a web page

Private Sub Import()
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.navigate "h++p://www.mywebsite/mywebpage.html"
Do While .ReadyState < 4: DoEvents: Loop
Range("A1").Value = ie.document.table7.Rows(1).Cells(1)
End With
ie.Quit
Set ie = Nothing
End Sub

Here is a small code that I wrote to import few values from a webpage.
My webpage has a table grid of 5 X 4 (Five columns and Four rows), Name
of this table in javascript is "table7"

It opens IE, navigates to my page but the following line doesn't
execute. What is the correct syntax?
Range("A1").Value = ie.document.table7.Rows(1).Cells(1)

Maxi