How to Remove ListView Item in VB 6.0
Hello Guys,, I am Trying Remove Item in ListView But my Code Does not Work..
heres my Code
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
Next
MsgBox "Record Delete", vbOKOnly, "Success"
End If
End Sub
Help Me Guys Thanks..
Re: How to Remove ListView Item in VB 6.0
Create a second LV, and display the results!
Re: How to Remove ListView Item in VB 6.0
What do you mean when you say it don't work? Does it crash? Does it remove something that you don't want removed? Does it burn the popcorn?