943,812 Members | Top Members by Rank

Ad:
Jul 3rd, 2008
0

reading data from website

Expand Post »
hi

i used the following code to read data from web.

this is my code

Private Sub Command1_Click()
Dim Text As Variant
WebBrowser1.Navigate ("www.google.co.in")
Text = WebBrowser1.Document.Body.Innertext
MsgBox Text

For i = 1 To 1000
If Mid$(Text, i, 8) = "google" Then
MsgBox ("String Found")
End If
Next i
End Sub


when i execute this code ,i receive an error message
runtime error :'91'
"object variable or with block variable not set"

the error appears in the underlined statement.
also i use IE 7.will there be any problem due to this.

pls help me out
thank u
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mykar_88 is offline Offline
17 posts
since Mar 2008
Jul 3rd, 2008
0

Re: reading data from website

Click to Expand / Collapse  Quote originally posted by mykar_88 ...
hi

i used the following code to read data from web.

this is my code

Private Sub Command1_Click()
Dim Text As Variant
WebBrowser1.Navigate ("www.google.co.in")
Text = WebBrowser1.Document.Body.Innertext
MsgBox Text

For i = 1 To 1000
If Mid$(Text, i, 8) = "google" Then
MsgBox ("String Found")
End If
Next i
End Sub


when i execute this code ,i receive an error message
runtime error :'91'
"object variable or with block variable not set"

the error appears in the underlined statement.
also i use IE 7.will there be any problem due to this.

pls help me out
thank u
I've ran your code and it worked fine for me.

I am using IE 6.

Try unistall IE 7 to IE 6,

I've heard that people have had problems with IE7 and the web browser. there are some tutorials on the net to fix it with IE7, first I'll see if IE 7 is the problem
Last edited by bushman_222; Jul 3rd, 2008 at 11:31 am.
Reputation Points: 10
Solved Threads: 4
Junior Poster in Training
bushman_222 is offline Offline
65 posts
since Jan 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Automatically Generate PDF Files in DWGeditor
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Hi VB Masters





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC