HI,
well I no an expert at all, my friend, just learning on the go
but thanks
What I will do is put in tomorrow’s date and wait until tomorrow and see if it auto moves then
I don't think this will work like that. You need to trigger the event somehow. The picture you shared seems to be OK. Here the event happens when you activate the sheet.
But better I think, would be during workbook open. So try change to this:
This code in the Sheet "Delivered":
Private Sub Worksheet_Change(ByVal Target As Range)
Dim nxtRow As Long
If Target.Column = 8 Then
If Target = Date Then
Application.EnableEvents = False
nxtRow = Sheets("Closed").Range("B" & Rows.Count).End(xlUp).Row + 1
Target.EntireRow.Copy _
Destination:=Sheets("Closed").Range("A" & nxtRow)
Target.EntireRow.Delete
End If
End If
Application.EnableEvents = True
End Sub
This code in ThisWorkbook:
Private Sub Workbook_Open()
Worksheets("Closed").Activate
Dim ws As Worksheet
Dim rng As Range, cell As Range
Dim lrow As Integer
Set ws = Worksheets("Delivered")
lrow = ws.Range("H" & Rows.Count).End(xlUp).Row
Set rng = ws.Range("H2:H" & lrow)
For Each cell In rng
If cell = Date Then
cell.Value = cell.Value
End If
Next cell
End Sub
You can enter tomorrow's date in the spreadsheet, save the file and close it. Change your system date to tomorrow for testing. Open the workbook and rows should be moved to Closed.
Regards,
s.
Bookmarks