Perhaps storing as a Name would be best, then it should be less likely to be deleted accidentally
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim CellChanges As Long
If Target.Address = "$A$1" Then
On Error Resume Next
CellChanges = Evaluate(ThisWorkbook.Names("USED").RefersTo)
If CellChanges < 1 Then CellChanges = 1 'first used
CellChanges = Evaluate(ThisWorkbook.Names("USED").RefersTo) + 1
MsgBox CellChanges '<- test delete
ThisWorkbook.Names.Add Name:="USED", RefersTo:="=" & CellChanges
End If
On Error GoTo 0
End Sub
Bookmarks