in project i have
list1 ' holds as friends usernames
what i want to archive is when i remove selected item from list1 then appath freinds.text selected name to be deleted.
current code
i need the delete button code when list1 selected item removed then remove that item from friends.txt
list1 ' holds as friends usernames
what i want to archive is when i remove selected item from list1 then appath freinds.text selected name to be deleted.
current code
Code:
Private Sub Command2_Click()
' adds text2 items to list1 , text2 items are usernames in this case
List1.AddItem Text2
End Sub
Code:
Private Sub Command4_Click()
' saves list1 to friends.text in appath
Open "friends.txt" For Output As #1
For I = 0 To List1.ListCount - 1
Print #1, List1.List(I)
Next
Close
End Sub
Code:
Private Sub Command5_Click()
' adds all friends.text to list1
Dim FF As Integer
Dim strLine As String
FF = FreeFile()
Open App.Path & "\friends" & ".txt" For Input As FF
Do While Not EOF(FF)
Line Input #FF, strLine
List1.AddItem strLine
Loop
Close #FF
End Sub
i need the delete button code when list1 selected item removed then remove that item from friends.txt