Hello Guys,, I am Trying Remove Item in ListView But my Code Does not Work..
heres my Code
Private Sub Command4_Click()
Dim choice As Integer
Dim str As String
Dim i As Integer

choice = MsgBox("Are you sure you want to delete this record?", vbYesNo + vbQuestion, "Confirmation")

If choice = vbYes Then
For i = ListView1.ListItems.Count To 1 Step -1
        If (ListView1.ListItems(i).Text = "") Then
            ListView1.ListItems.Remove (i)
        End If

    MsgBox "Record Delete", vbOKOnly, "Success"

End If
End Sub
Help Me Guys Thanks..