How to delete a row in a ListBox using the Delete Key

  • Thread starter Thread starter GandaSalada via AccessMonster.com
  • Start date Start date
G

GandaSalada via AccessMonster.com

Somebody knows how to delete a row in a ListBox using the Delete Key:

When I select a row and press the delete key, nothing happens.
I know how to delete a row form the ListBox, my problem is how to assign the
event to the delete key.

thank you for your help
 
Somebody knows how to delete a row in a ListBox using the Delete Key:

When I select a row and press the delete key, nothing happens.
I know how to delete a row form the ListBox, my problem is how to assign the
event to the delete key.

thank you for your help

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyDelete Then
' Code to delete selected item in listbox
End If
End Sub
 
Thank you!
Somebody knows how to delete a row in a ListBox using the Delete Key:
[quoted text clipped - 6 lines]
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyDelete Then
' Code to delete selected item in listbox
End If
End Sub
 
Back
Top