Sub Stockage2()
Dim Col As Long
Dim Lig As Long
Dim Description As String
Dim Annee As String
Dim Cel As Range
Dim lg As Long
Dim Cl As Integer
Dim Nature As Integer
Dim Nombre As Integer
Col = ActiveSheet.Shapes(Application.Caller).TopLeftCell.Column
Lig = ActiveSheet.Shapes(Application.Caller).TopLeftCell.Row
Description = Cells(Lig, Col - 2)
With Sheets("Récapitulatif")
Nature = IIf(MsgBox("Circulante?", vbYesNo) = vbYes, 1, 2)
Set Cel = .Columns("B:AA").Find(what:=Description, LookIn:=xlValues, lookat:=xlWhole)
If Not Cel Is Nothing Then
If Cel.Offset(0, Nature) >= 0 Then
Nombre = IIf(Cel.Offset(0, Nature) = "", 0, Cel.Offset(0, Nature))
If MsgBox("Vous possédez " & Nombre & " pièce(s) " & "'" & Description & "'" & vbCr & _
"Voulez-vous en rajouter une de plus ? ", vbInformation + vbYesNo, _
"Mis à jour du stock") <> vbYes Then
Exit Sub
Else
Cel.Offset(0, Nature) = Cel.Offset(0, Nature) + 1
End If
End If
Else
MsgBox "Description non trouvé : " & Description
End If
End With
End Sub