Results 1 to 2 of 2

Thread: Importing data from a web page

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    1

    Question

    How would I go about importing data from a web page, for instance a table, into a text field. This is assuming that the web page is always in the same format. What about if there are multiple tables on the page, how could I pull data from different cells from different tables? Thanks.

  2. #2
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    Well what you could do is take the code from the page and parse it to specified places and place the parsed text into specific text boxes.
    Something like
    Code:
    Text1.Text = Inet1.OpenURL("http://www.somesite.com/index.asp", icString)
    Dim int_Pos As Integer
    Dim int_X As Integer
    For int_X = 1 To CInt(Text2.Text)
        int_Pos = int_Pos + 1
        int_Pos = InStr(int_Pos, Text1.Text, Text3.Text)
            If int_Pos = 0 Then Exit Sub
        Text4 = Mid(Text1.Text, int_Pos + Len(Text3.Text), 12)
    Next
    'Play around with this code and you'll realize what 
    'you have to do to achieve what you want.

    Gl,
    D!m
    Dim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width