Private Sub Command2_Click()
'this is my bunched up code.
'its messy but it works good enough!
'maybe you can fix it up neatly? lol
Dim a As Integer
Dim b As Integer
Dim Doc
Dim pos As Integer
Dim entry() As String
Dim I As Long, X As Long, Y As Long
On Error GoTo z
wb.Navigate Text4.Text
Set Doc = wb.Document
Text1.Text = Doc.body.innerHTML
a = InStr(1, Text1.Text, Label1)
b = InStr(a, Text1.Text, Label2)
Text2.Text = Mid(Text1.Text, a, b - a)
Text2.Text = Replace(Text2, Label1, "")
If Text2.Text = "" Then Exit Sub
On Error Resume Next
entry = Split(Text2.Text, vbCrLf, , vbTextCompare)
pos = 0
Do While pos < UBound(entry)
If Trim$(entry(pos)) <> "" Then
If Mid(entry(pos), 1, 1) = vbCrLf Then GoTo k
List1.AddItem Mid(entry(pos), 17)
GoTo t:
k:
List1.AddItem Replace(Mid(entry(pos), 17), vbCrLf, "")
t:
End If
pos = pos + 1
Loop
For I = 0 To List1.ListCount - 1
For X = 0 To List1.ListCount - 1
If X <> I Then
If List1.List(I) = List1.List(X) Then
List1.RemoveItem X
X = X - 1
If I > List1.ListCount Then Exit Sub
If X > List1.ListCount Then Exit Sub
End If
End If
Next
Next
Exit Sub
z:
Command3_Click
Module1.Flash Me
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Beep
Pause 1
Beep
End Sub