Aspen2K
10-04-2001, 08:46 AM
Hello, I'm quite confused as to why the code below only adds the links from the last url in list2. Why is it not collecting all the other urls links? Thank you.
Option Explicit
Private Sub Command1_Click()
Dim x As Long
Command1.Enabled = False
For x = 0 To List2.ListCount - 1
WebBrowser2.Navigate2 List2.List(x)
Next x
End Sub
Private Sub Command2_Click()
List2.AddItem "http://" & txtaddurl.Text
txtaddurl.Text = ""
End Sub
Private Sub WebBrowser2_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim x As Long
For x = 0 To WebBrowser2.Document.Links.length - 1
List1.AddItem WebBrowser2.Document.Links.Item(x)
Next x
Command1.Enabled = True
End Sub
Private Sub WebBrowser2_StatusTextChange(ByVal Text As String)
Label3 = Text
End Sub
Option Explicit
Private Sub Command1_Click()
Dim x As Long
Command1.Enabled = False
For x = 0 To List2.ListCount - 1
WebBrowser2.Navigate2 List2.List(x)
Next x
End Sub
Private Sub Command2_Click()
List2.AddItem "http://" & txtaddurl.Text
txtaddurl.Text = ""
End Sub
Private Sub WebBrowser2_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim x As Long
For x = 0 To WebBrowser2.Document.Links.length - 1
List1.AddItem WebBrowser2.Document.Links.Item(x)
Next x
Command1.Enabled = True
End Sub
Private Sub WebBrowser2_StatusTextChange(ByVal Text As String)
Label3 = Text
End Sub