Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capturing Delete Key

Status
Not open for further replies.

JoeSmoe55

Programmer
Aug 1, 2005
38
US
how would I capture the Delete Key. More specifically I want to capture the delete button on a listview object. It seems that OLE objects tend to have all the same functions that other form objects have. I have tried keydown and keypress events to no avail. Are there any other options? Thanks.

joeSmoe
 
Did you try KeyUp Event?
Code:
Private Sub ListView1_KeyUp(KeyCode As Integer, ByVal Shift As Integer)
    If KeyCode = vbKeyDelete Then
        MsgBox "You pressed delete"
    End If
End Sub

ListView & Microsoft Access - Part 1 - (Load Data) faq702-6025
ListView & Microsoft Access - Part 2 (Master-Sub & Column total) faq702-6026

________________________________________________________________________
Zameer Abdulla
Visit Me
Children are poor men's riches.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top