Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Delete Button Code!

Discussion in 'Information Technology' started by Bob, Jul 28, 2006.

  1. Bob

    Bob
    Expand Collapse
    Guest

    I want to put a delete button next to a listbox called "tbStableDescription"
    What code would i use to delete its contents on that form?


    Thanks in advance.........Bob Vance
     
  2. Loading...


  3. Wayne-in-Manchester

    Wayne-in-Manchester
    Expand Collapse
    Guest

    To use the Key Press function (you could put it behind any other funtion if
    you wanted

    Private Sub tbStableDescription_KeyPress(KeyAscii As Integer)
    If KeyCode = vbKeyDelete Then
    On Error Resume Next
    List1.RemoveItem List1.ListIndex
    End If
    End Sub


    Hope this helps

    --
    Wayne




    "Bob" wrote:

    >
    >
    > I want to put a delete button next to a listbox called "tbStableDescription"
    > What code would i use to delete its contents on that form?
    >
    >
    > Thanks in advance.........Bob Vance
    >
    >
    >
     

Share This Page