I have a button that is on sheet2 and i am trying to delete the last row in sheet1 using VBA.
When i delete the row, i dont want my screen to go to sheet1.
This was happening when i tried to use .activate.
Private Sub CommandButton3_Click() ActiveSheet.Cells(Rows.Count, "A").End(xlUp).EntireRow.Delete End Sub
If the name of the first sheet is Sheet1 then use: