Hi Everyone,

After looking for solutions I still can't fix this error. All the references are loaded like 'microsoft internet explorer controls' and 'html object library'.

The error is in this code:
PHP Code: 
quote Trim(doc.getElementsByTagName("h2").innerText
The whole code is here:

PHP Code: 
Private Sub Worksheet_Change(ByVal Target As Range)

Dim i As InternetExplorerdoc As HTMLDocumentrng As Rangeticker As Stringquote As String

Set rng 
Sheets("Sheet1").Range("A1")
ticker rng.Value




Set ie 
CreateObject("InternetExplorer.Application")


If 
Target.Row rng.Row And Target.Column rng.Column Then

       ie
.navigate "http://www.soccerpunter.com/soccer-statistics/Netherlands/Eredivisie-2014-2015/head_to_head_statistics/all/1515_AFC_Ajax/1516_Alkmaar_Zaanstreek"
       
Do
       
DoEvents
       
               Loop Until ie
.readyState READYSTATE_COMPLETE
               Set doc 
ie.document
               On Error 
GoTo handler
               quote 
Trim(doc.getElementsByTagName("h2").innerText)
                
On Error GoTo 0
               
              Cells
(12).Value quote
              
              End 
If
              



Exit 
Sub

handler
:
MsgBox "fout melding"
ie.Application.Quit

End Sub 
Thanks for any help