I have a webpage loading into a webbrowser control but the webpage (which I cannot edit) calls a javascript function in the body onload.

I what to stop the onload from firing.

This doesn't work:
Code:
Private Sub WebBrowser2_DocumentComplete(ByVal pDisp As Object, URL As Variant)

Dim doc As HTMLDocument
Set doc = WebBrowser2.Document
doc.body.removeAttribute "onload"

End Sub
Any ideas?

Thanks