Törölt nick Creative Commons License 2012.02.14 0 0 17203

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    Dim rng As Range
    
    If Target.Row < 2 Then Exit Sub
    Set rng = Range(Intersect(Me.Rows(1), Target.EntireColumn), Target.Offset(-1))
    If rng Is Nothing Then Exit Sub
    Application.EnableEvents = False
    Target.Value = Application.WorksheetFunction.Max(rng) + 1
    Cancel = True
    Application.EnableEvents = True
End Sub

 

Előzmény: Redlac (17201)