|
-
Sep 16th, 2003, 10:16 PM
#1
Thread Starter
Lively Member
Load HTML source in Text box
I am trying to put my HTML in a text box so i can extract the data from it. I can print it to the form but not to the text box. What is the best way to do this?
Also how do I parse it out once it is in the text box. The information will be printed to a file to be used in Exel. I will need to search for the information between "text4" and exclude the tags.
Thanks for any help.
Here is the code i am using.
Dim myurl As String
Private Sub cmdret_Click()
myurl = txturl.Text
WebBrowser1.Navigate2 (myurl)
Inet1.Protocol = icHTTP
Inet1.Execute CStr(txturl), "GET /"
While Inet1.StillExecuting
DoEvents
Wend
MsgBox "Done"
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
Select Case State
Case 12
stemp = Inet1.GetChunk(100)
While stemp <> ""
Form1.Print stemp;
stemp = Inet1.GetChunk(100)
Wend
Form1.Print
Case 11
MsgBox Inet1.ResponseInfo, vbCritical, "error"
End Select
End Sub
Private Sub txturl_Change()
myurl = txturl.Text
End Sub
-
Sep 16th, 2003, 10:34 PM
#2
Lively Member
Hey Everybody!
I was wondering about this problem too. Does anybody know how to download a file by its URL? Is it possible perhaps to use the IE object to navigate to the page you want and then find the file in your Temporary Internet Files folder? If anybody finds out how to do this, I'd appreciate it a lot. In the mean time, i will take a look at it myself.
-
Sep 17th, 2003, 06:24 AM
#3
Thread Starter
Lively Member
The code listed gets the HTML but I need to put it in a text box , not the form. How do i do this?
-
Sep 17th, 2003, 06:38 AM
#4
Junior Member
Originally posted by tarctor
The code listed gets the HTML but I need to put it in a text box , not the form. How do i do this?
How about
Code:
Text1.Text = Text1.Text & stemp
instead of
?
-
Sep 17th, 2003, 07:12 AM
#5
Thread Starter
Lively Member
This works
Hi that works for getting it into a text box , now i have another problem. My code for some reason doesnt get all the HTML. should it pause to wait on the internet to load completly ? if so how do i do this?
-
Sep 17th, 2003, 08:13 AM
#6
Hyperactive Member
hi,
for this problem use richtextbox control it is easy get html data and also print the same.
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
|