|
-
May 16th, 2007, 11:37 AM
#1
Thread Starter
Hyperactive Member
Web Browser - Strange DocumentComplete behaviour
Hello,
I've come across a problem whilst coding my web browser control. Any help would be very much appreciated. Here's the deal:
VB Code:
Private Sub net_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If (pDisp = net.Application) Then
work.Text = net.Document.documentelement.innerHTML
End If
Call yell
End Sub
Now, before I even navigate to a page. (On form load in fact), my web browser control (net) fires the following error:
It highlights the work.text line
Code:
Rune-time error '91':
Object variable or With block variable not set
What is the cause of this problem? Thanks a lot.
Jord
-
May 16th, 2007, 12:25 PM
#2
Re: Web Browser - Strange DocumentComplete behaviour
I'm not sure if there is any element in IHTMLDOM called documentelement.
Change it to:
net.Document.Body.innerHTML
and see what happens.
-
May 16th, 2007, 02:21 PM
#3
Thread Starter
Hyperactive Member
Re: Web Browser - Strange DocumentComplete behaviour
I'm almost 90% sure that DocumentElement is an element.
Same problem when using the body tag.
Jord
-
May 16th, 2007, 02:37 PM
#4
Re: Web Browser - Strange DocumentComplete behaviour
 Originally Posted by intraman
I'm almost 90% sure that DocumentElement is an element.
Sure it is. A Google search helped me. Thanks. 
http://www.google.com/search?client=...utf-8&oe=utf-8
May be it is foolish...but still...try:
If (pDisp Is net.Application) Then
-
May 16th, 2007, 04:40 PM
#5
Thread Starter
Hyperactive Member
Re: Web Browser - Strange DocumentComplete behaviour
 Originally Posted by iPrank
Well, thanks again but it hasn't sorted the problem.
I think it's something a bit deeper than that. I never thought I would be so difficult to retrieve HTML from a web page using the MICROSOFT Internet Control!
Jord
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|