Deleting Cells
This deletes the cells in the range "B2:F2".
Range("B2:F5").Delete(xlDeleteShiftDirection.xlShiftUp)
Range("B2:F5").Delete(xlDeleteShiftDirection.xlShiftToLeft)
If the Shift argument is omitted then Excel will guess the best direction based on the shape of the range.
Clearing Data
ActiveCell.CurrentRegion.ClearContents
Selection.Delete
Even with displayalerts = false you will get the following prompt if the selection currently has a filter applied to it.
SS
Delete entire row ?
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext