Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to disable the delete key after deletion is made
Hello again
If the user presses the delete key to delete something entered, my program executes which I dont want. How can you simply have the value deleted and then exit sub for example so the program doesnt continue further. I have tried Application.OnKey "{delete}" ', "matrix" ' not quite what Im looking for if .Value = vbKeyDelete Then ' this does nothing Exit Sub endif Thanks Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to disable the delete key after deletion is made
Do you mean that you have a Worksheet_Change event macro that you don't want
to run if the user has cleared the cell? If so, Private Sub Worksheet_Change(ByVal Target As Range) If IsEmpty(Target.Value) Then Exit Sub 'your code goes here End Sub On Sat, 22 Jan 2005 14:56:21 -0500, Susan Hayes wrote: Hello again If the user presses the delete key to delete something entered, my program executes which I dont want. How can you simply have the value deleted and then exit sub for example so the program doesnt continue further. I have tried Application.OnKey "{delete}" ', "matrix" ' not quite what Im looking for if .Value = vbKeyDelete Then ' this does nothing Exit Sub endif Thanks Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I disable or delete an Add-In | Excel Discussion (Misc queries) | |||
Disable the Delete Key | Excel Discussion (Misc queries) | |||
Disable Delete | Excel Discussion (Misc queries) | |||
Confirm Delete Message Disable | New Users to Excel | |||
Disable entire row delete on certain sheet | Excel Programming |