-
keyascii
when i enter the code in List1.Keypress
if keyascii = 68 then list1.removeitem (list1.listindex);
if the user hits D then the selected item is removed.
when I do it with delete, however:
if keyascii = 46 then list1.removeitem (list1.listindex)
when they press DELETE nothing happens! What is the code>?
-
Re: keyascii
Use the KeyDown Event instead and use the VB constants, ie.
private Sub List1_KeyDown(KeyCode as Integer, Shift as Integer)
If List1.ListIndex > -1 then
If KeyCode = vbKeyDelete then
List1.RemoveItem List1.ListIndex
End If
End If
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]