OzzieBloke
Programmer
I have a program which can have multiple users. I have created it so that extra users can be added. This is done by creating a txt document which I have called source and placing the users name and ID number within. However I am having some trouble removing the users from the text document.
This is my code so far:
Private Sub Remove_Click()
Open "source.txt" For Input As #1
Open "target.txt" For Output As #2
Do While Not EOF(1)
nIndex = 0
Input #1, UserName, UserID
If Not NewUser.User.Selected(nIndex) = UserName Then
Write #2, UserName, UserID
Else
nIndex = nIndex + 1
End If
Loop
Close
End Sub
This is my code so far:
Private Sub Remove_Click()
Open "source.txt" For Input As #1
Open "target.txt" For Output As #2
Do While Not EOF(1)
nIndex = 0
Input #1, UserName, UserID
If Not NewUser.User.Selected(nIndex) = UserName Then
Write #2, UserName, UserID
Else
nIndex = nIndex + 1
End If
Loop
Close
End Sub