Try:
In VBEditor, insert a new module and add
Option Explicit
Public kounter As Long
In the ThisWorkbook module add
Option Explicit
Private Sub Workbook_Open()
kounter = Sheets(1).Range("A65536").Value
If kounter = 0 Then kounter = 1000
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets(1).Range("A65536").Value = kounter
End Sub
In the module for the sheet add
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim Seq As Range
Set Seq = Target
Seq.Select
Seq.Value = kounter
kounter = kounter + 1
Seq.Offset(0, 1).Select
End Sub
Bookmarks