I have this function which is trying to detect when a particular cell value changes. The problem is, if the user selects the whole spreadsheet and presses delete, I get an o
Use CountLarge instead of Count
Private Sub Worksheet_SelectionChange(ByVal target As Range) If target.Cells.CountLarge > 1 Then Exit Sub 'Code... End Sub
See: MSDN Range.CountLarge Property (Excel)