View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rik Rik is offline
external usenet poster
 
Posts: 16
Default Pick data from web page (no query)

I want to pick a certain streaming value on a webpage and drop it into my
excel sheet, but following testcode won't work properly :
===================
Sub Getquotes()
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
URL = "https://www.binck.com/gekko/default.aspx? Redir=/gekko/common/
researchennieuws/fondsdetails/overzicht.aspx?binc=1068754"

'get web page
IE.Navigate2 URL
Do While IE.readyState < 4
DoEvents
Loop
Set last = IE.document.getElementByID("1068754|LAST")
Range("A1") = last

End Sub
==================

This code fails at line : "Range("A1")=last" (failure 1004)

In the html of the webpage i could find :

ID="1068754|LAST" NAME="1068754|LAST" style="width:68px;"356,50<span
class='c4d'00</span</td<td align="right" ID="1068754|TIME"
NAME="1068754|TIME" style="width:68px;"9:42</td<td align="right"
ID="1068754|LASTVOL" NAME="1068754|LASTVOL" style="width:68px;"1</td
</tr<tr class="bkgnd_1"
<td align="left"+/-</td<td class="cQuoteUp" align="right"

etcetc

so i guess the syntax of "Set last= ...etc" is correct ?

What did i do wrong ?