-
February 23rd, 2013, 05:36 AM
#1
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..
-
February 24th, 2013, 02:03 AM
#2
Re: How to Remove ListView Item in VB 6.0
Create a second LV, and display the results!
-
February 24th, 2013, 02:38 AM
#3
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?
Always use [code][/code] tags when posting code.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|