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
Bookmarks