VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This program is used to add and remove data from a List box

by Dave Deponeo (2 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 31st March 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This program is used to add and remove data from a List box

Rate This program is used to add and remove data from a List box



lstClient.AddItem txtName.Text
txtName.Text = ""
txtName.SetFocus
lblDisplay.Caption = lstClient.ListCount
End Sub

Private Sub cmdClear_Click()
lstClient.Clear
cmdRemove.Enalbed = False
lblDisplay.Caption = lstClient.ListCount
End Sub

Private Sub cmdClose_Click()
Unload Me
End Sub

Private Sub cmdRemove_Click()
Dim Ind As Integer

Ind = lstClient.ListIndex
If Ind >= 0 Then
lstClient.RemoveItem Ind
lblDisplay.Caption = lstClient.ListCount
Else
Beep
End If
cmdRemove.Enabled = (lstClient.ListIndex <> -1)
End Sub

Private Sub lstClient_Click()
cmdRemove.Enabled = lstClient.ListIndex <> -1
End Sub

Private Sub txtName_Change()
cmdAdd.Enabled = (Len(txtName.Text) > 0)

End Sub


Download this snippet    Add to My Saved Code

This program is used to add and remove data from a List box Comments

No comments have been posted about This program is used to add and remove data from a List box. Why not be the first to post a comment about This program is used to add and remove data from a List box.

Post your comment

Subject:
Message:
0/1000 characters