Hello all,
I have a list box and I want to delete an item by pressing 'delete'
My code only works with backspace... What can I do?
VB Code:
Private Sub lst1_KeyPress(KeyAscii As Integer) If lst1.ListCount > 0 Then If KeyAscii = 8 Then lst1.RemoveItem lst1.ListIndex End If End If End Sub
I supose that ascii code for delete key is 127... but if you press 'delete', the event lst1_KeyPress don't catch it...
Thanks




Reply With Quote