reading data from website

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2008
Posts: 16
Reputation: mykar_88 is an unknown quantity at this point 
Solved Threads: 0
mykar_88 mykar_88 is offline Offline
Newbie Poster

reading data from website

 
0
  #1
Jul 3rd, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 65
Reputation: bushman_222 is an unknown quantity at this point 
Solved Threads: 4
bushman_222's Avatar
bushman_222 bushman_222 is offline Offline
Junior Poster in Training

Re: reading data from website

 
0
  #2
Jul 3rd, 2008
Originally Posted by mykar_88 View 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
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC