If it is working now, then you can remove those 3 Message Box lines, that were just added for debugging.
What did you change that started it working?
Or did you just run the manual macro I posted in my last post?
If the latter, let me explain what is happening. Automated code is called "event procedure" code. It is code that automatically runs upon some "event" happening, like changing a cell, selecting a cell, saving your file, etc. You have to be careful with this kind of code, or else you could get caught in an endless loop. For example, let's say that whenever a value is entered into cell A1, we want to add 5 to it. However, adding 5 to it is entering a new value, so it spurs the code to run again, etc, etc.
So to avoid that from happening, you will often see the following line in the VBA code: Application.EnableEvents = False
That temporarily "shuts off" the automated event procedure code, so any changes under that line will not trigger the code to call itself and get caught in a loop.
However, that line shuts off ALL event procedure code. So, in order to turn it back on again, we then have another line after our changes like this: Application.EnableEvents = True
What happens sometimes, is maybe your code gets interrupted (due to an error or other error debugging techniques, like stepping into and out of code), so that the line that shuts it off runs, but it never gets to the line that turns it back on. When that happens, none of the your event procedure code will run automatically (what you were reporting). So running that little manual script I gave is simply turning it back on.
I don't experience that behavior. Each time I enter "Closed" in column D, I have it moving that row to the bottom, and deleting the blank row.
So the total number of rows never changes, and there are never any "blank" rows left behind by moving a row.
If you do it multiple times, it keeps moving that last row you "Closed" to the bottom.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Long
If Target.CountLarge > 1 Then Exit Sub
' See if cell just updated is in column D, if not exit sub
If Target.Column <> 4 Then Exit Sub
' See if cell just updated set to "Closed"
If Target.Value = "Closed" Then
r = Target.Row
' Move to end
Application.EnableEvents = False
Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Select
Application.EnableEvents = True