MY FOR LOOP WONT START.
It will not proceed here
For b = 0 To profilesearchbox.Items.Count - 1 Step 1
Code Code:
Public Sub deleteprofile(profilename) Try MsgBox(profilesearchbox.Items.Count) /// WILL PROMPT THE ITEMS COUNT <> 0 For b = 0 To profilesearchbox.Items.Count - 1 Step 1 MsgBox(profilesearchbox.Items.Count & " " & b & " " & profilesearchbox.Items(b).text) //DID NOT PROMPT If profilesearchbox.Items(b).text = profilename Then Dim direct As String = adr + "\profile\arb.sec" File.SetAttributes(adr + "\profile\arb.sec", FileAttributes.Normal) Dim lines As New List(Of String)(IO.File.ReadAllLines(direct)) 'Remove the line to delete, e.g. lines.RemoveAt(B) MsgBox("2") IO.File.WriteAllLines(direct, lines.ToArray()) File.SetAttributes(adr + "\profile\arb.sec", FileAttributes.System) File.SetAttributes(adr + "\profile\arb.sec", FileAttributes.Hidden) MsgBox(profilename & " has successfully Deleted", MsgBoxStyle.Information) End If Next MsgBox(profilename & " has successasdsad", MsgBoxStyle.Information) Catch End Try End Sub
Quote:
For b = 0 To profilesearchbox.Items.Count - 1 Step 1