Good morning, I have an excel workbook that has two tabs. one is 2015 and the other is Shipping. Both sheets are identical. I have added a code in column Y (date shipped) and have received a Run-time error of "1004' - we can not do that to a merged cell. Please advise what I need to change in order for this to work. Please see the code below - the BOLD line is the error line.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("Y:Y")) Is Nothing Then
Cancel = True
Dim Lastrow As Long
Lastrow = Sheets("Shipped").Cells(Rows.Count, "Y").End(xlUp).Row + 1
Rows(Target.Row).Cut Destination:=Sheets("Shipped").Rows(Lastrow)
Rows(ActiveCell.Row).EntireRow.Delete
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("Y:Y")) Is Nothing Then
Cancel = True
Dim Lastrow As Long
Lastrow = Sheets("Shipped").Cells(Rows.Count, "Y").End(xlUp).Row + 1
Rows(Target.Row).Cut Destination:=Sheets("Shipped").Rows(Lastrow)
Rows(ActiveCell.Row).EntireRow.Delete
End If
End Sub