Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Cible As Range, Retour As Boolean)
Dim DatePrest As Date
If Not Application.Intersect(Cible, Range("B:B")) Is Nothing Then
If Cible.Offset(0, 1).Value <> "" And Cible.Value = "" Then
DatePrest = Cible.Offset(0, 1).Value
Cible.Value = "DO" & Format(DatePrest, "yy") & Format(DatePrest, "mm") & Format(Range("DerNoPris").Value + 1, "00000")
Range("DerNoPris").Value = Range("DerNoPris").Value + 1
End If
End If
End Sub