On Jan 15, 2007, at 2:48 PM, Youri wrote:

I simply would like to delete the selected row(s) of a list box when the user press the "Backspace" key on its keyboard.

I can't find which event to invoque.

Use the keydown event:

---------------

  Dim x As Integer

  If Asc(Key) = 8 Or Asc(key) = 127 Then
    For x = Me.ListCount - 1 DownTo 0
      If Me.Selected(x) Then
        Me.RemoveRow x
      End If
    Next
  End If

----------------

By counting from the last row back to the first, this will also handle removing multiple rows.

Tim
--
Tim Jones
[EMAIL PROTECTED]



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to