Question : Worksheet_Change event not running when DELETE key is used

Hi, Experts:
I've seen a couple of questions like this but none were answered in a way that helped me, so sorry for any redundancy. I need the Worksheet_Change event to delete contents in some cells if a specific cell's contents are deleted. But the code won't run if the cell is changed with the Delete key....this is driving me nuts. Can someone please help? Partial code is below. Thanks!
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
If Not Intersect(Target, Range("A9:A21")) Is Nothing Then
        'first employee
        If Target.Address = "A9" Then
            If Target = "" Then
                Application.EnableEvents = False
                Cells(Target.Row, Target.Column + 1).Value = ""
                Cells(Target.Row, Target.Column + 2).Value = ""
                Cells(Target.Row, Target.Column + 3).Value = ""
                Cells(Target.Row, Target.Column + 4).Value = ""
                Cells(Target.Row, Target.Column + 5).Value = ""
                Cells(Target.Row, Target.Column + 6).Value = ""
                Cells(Target.Row, Target.Column + 7).Value = ""
            End If
            'more code will follow
            Application.EnableEvents = True
        End If
     End If

Answer : Worksheet_Change event not running when DELETE key is used

Good consultant actually suppose to ask those question to figure out what you need.
First define in plain English for yourself what you need and, if this is existing application, what is our major  problem(s).

For better use of consultant time, if possible, try to split his visits. For example if you have DB performance/blocking problems you may need to get his advise on how to collect sample queries form trace, - this may take 1 hour, 1 day or 1 week or more depending on your application design and usage. Then you will implement their suggestions and again it may take time to see is if works or not.

if your intention is complete DB redesign - you need to prepare detailed description of your application, use cases, define what is UI for your database,  and list major problems with existing design

If your concerns is capacity/scalability - you need to define where you expect your growth and how DB structude will support it


 
Random Solutions  
 
programming4us programming4us