how do i remove a specific item from the list

April 8, 2011 at 07:03:32
Specs: Windows XP
I have a simple program, When i check a check box the item goes into the liost and when i re-click it doesn't, How do i do this?

See More: how do i remove a specific item from the list

Report •

#1
April 8, 2011 at 07:05:22
Current code for the check box
Private Sub Check1_Click()
If Check1.Value = 0 Then
LBLtotalprice.Caption = Val(LBLtotalprice) - 79.99
List1.RemoveItem
Else

Check1.Value = 1
LBLtotalprice.Caption = Val(LBLtotalprice) + 79.99
List1.AddItem "Water Fountain"
End If

End Sub

Report •

#2
April 9, 2011 at 02:31:26
It's a tricky one, because RemoveItem goes on ListIndex. I've worked out a longwinded way to do it, but I'll think of a shorter way soon (Mine involves writing to text files and all sorts of rubbish lol)

Report •
Related Solutions


Ask Question