I got this error sometimes, thats weird...
Sometimes the software works and sometime it gives this error.
cmmBox.SelectedItem is a URL
HTMLSource is a function to grab the HTML page.
myPageNumber2 is a integer.
Here is the specific line and the whole code:
Specific Line:
sourcePage2.Text = HTMLSource(cmmBox.SelectedItem & "/members?p=" & myPageNumber2)
Whole Code:
Do While myPageNumber2 <= pagesToScan
If allowScan = True Then
sourcePage2.Text = HTMLSource(cmmBox.SelectedItem & "/members?p=" & myPageNumber2)
For Each myLine2 As String In sourcePage.Lines
If myLine2.Contains("<p><a class=" & """" & "linkFriend_") Then
myLine2 = myLine2.Replace("<p><a class=" & """" & "linkFriend_", "")
If myLine2.Contains("/id/") Then
iStartIndex2 = myLine2.IndexOf("id/") + 3
iEndIndex2 = myLine2.IndexOf(">") - 1
userBox.Items.Add(myLine2.Substring(iStartIndex2, iEndIndex2 - iStartIndex2))
End If
End If
Next
myPageNumber1 = myPageNumber1 + 2
End If
Loop