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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.