|
-
Aug 3rd, 2008, 09:29 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Get All Images Link from HTML
i wrote this.......
but when i use debug.print img then it dont show anything in intermediate area
vb Code:
Public Sub imgTag(theData As String)
Dim I As Long, Z As Long, S As Long, IMG As String
On Error GoTo HeLL
S = 1
Dim DD As String
For I = 1 To UBound(Split(Text2.Text, "src="))
S = InStr(S, Text2.Text, "<img src=" & Chr(34))
Z = InStr(S, Text2.Text, Chr(34))
IMG = Mid(Text2.Text, S, (Z - Z))
debug.print IMG
S = S + 5
Next
HeLL:
Exit Sub
End Sub
●════════════════════════════◄►═════════════════════════●
___itš bεttεг tΘ bε απ Θρεπ šiππεг, thαπ α ƒαlšε šαiπt___
●════════════════════════════◄►═════════════════════════●
гαj
-
Aug 3rd, 2008, 10:09 AM
#2
Re: Get All Images Link from HTML
 Originally Posted by _RaJ_

Put something into your error handler. For example:
Code:
Debug.Print Err.Number & ", " & Err.Description
... to see what's wrong.
-
Aug 3rd, 2008, 11:20 AM
#3
Thread Starter
Addicted Member
Re: Get All Images Link from HTML
●════════════════════════════◄►═════════════════════════●
___itš bεttεг tΘ bε απ Θρεπ šiππεг, thαπ α ƒαlšε šαiπt___
●════════════════════════════◄►═════════════════════════●
гαj
-
Aug 3rd, 2008, 11:40 AM
#4
Re: Get All Images Link from HTML
Try changing
IMG = Mid(Text2.Text, S, (Z - Z))
to
IMG = Mid(Text2.Text, S, (Z - S))
-
Aug 3rd, 2008, 12:05 PM
#5
Thread Starter
Addicted Member
Re: Get All Images Link from HTML
 Originally Posted by MarkT
Try changing
IMG = Mid(Text2.Text, S, (Z - Z))
to
IMG = Mid(Text2.Text, S, (Z - S))
what is the diffrence!!?
●════════════════════════════◄►═════════════════════════●
___itš bεttεг tΘ bε απ Θρεπ šiππεг, thαπ α ƒαlšε šαiπt___
●════════════════════════════◄►═════════════════════════●
гαj
-
Aug 3rd, 2008, 12:25 PM
#6
Re: Get All Images Link from HTML
The last parameter of the mid function is for the number of characters to grab. In the code you posted lets assume that
S = 52
Z = 77
(Z - Z) = 0
So you are telling the mid function to grab 0 characters.
(Z- S) 15
So you are telling the mid function to grab 15 characters.
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
|