VB Code:
Private Sub LstSites_Click() If checkfile("links.txt") = True Then Open "links.txt" For Input As #1 While Not EOF(1) Line Input #1, strleesin If Not strleesin = "" Then If InStr(1, strleesin, ",") = True Then 'Categorie gevonden strtemp1 = Split(strleesin, " , ")(0) strtemp2 = Split(strleesin, " , ")(1) If strtemp1 = LstSites.Text Then LstSites.Text = strtemp1 LstCat.Text = strtemp2 End If Else 'Geen categorie gevonden strtemp1 = strleesin strtemp2 = "" If strtemp1 = LstSites.Text Then LstSites.Text = strtemp1 LstCat.Refresh End If End If End If Wend Close #1 End If End Sub
Can somebody explain why he also loops the opening of the file en the filecheck procedure? It crashes and says: File already open. That's because something loops my whole sub again! I don't know how!




Reply With Quote