Results 1 to 6 of 6

Data Gathering VBA (basic)

Threaded View

  1. #1
    Registered User
    Join Date
    12-28-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    54

    Data Gathering VBA (basic)

    Hello,

    Would someone take a gander at the following VBA program and tell me where I'm going wrong. There are two strings one for "src" and one for "href". I can get them both working individually, but when I try to connect them to save space, I get a 'run time error'. Here is the code:

    the_output_row = 1
        
        Do
        DoEvents
        
                start_of_src = InStr(the_html_code, "src")
                start_of_href = InStr(the_html_code, "href")
                If start_of_src & start_of_href > 0 Then
                the_output_row = the_output_row + 1
                the_url = Mid(the_html_code, start_of_src + 5 & start_of_href + 6, Len(the_html_code))
                the_html_code = Mid(the_html_code, start_of_src + 5 & start_href + 6, Len(the_html_code))
                the_url = Mid(the_url, 1, InStr(the_url, Chr(34)) - 1)
                Sheet2.Range("A" & the_output_row) = the_url
                'MsgBox the_url
                
        End If
        Loop Until start_of_src & start_of_href = 0
    3rd line from the bottom, is where I get my error. Any help would be appreciated.

    CheerZ!
    Aaron
    Last edited by wyldjokre69; 08-28-2013 at 06:38 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Gathering particular data
    By kishoremcp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-28-2012, 07:26 PM
  2. Web Data Gathering
    By Willis in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 11-09-2011, 01:07 PM
  3. [SOLVED] gathering data?
    By ftahbaz@gmail.com in forum Excel General
    Replies: 2
    Last Post: 08-18-2006, 01:55 PM
  4. Gathering Data
    By Spreadsheet in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-13-2006, 11:10 PM
  5. [SOLVED] gathering data
    By xak_tay in forum Excel General
    Replies: 0
    Last Post: 09-30-2005, 02:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1