1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
Dim Somme As Double
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Sh.Range("B3:U28")) Is Nothing Then
On Error GoTo Fin
Somme = InputBox("Indiquer la somme à ajouter !", "Somme")
Target.Value = Target.Value + Somme
End If
Exit Sub
Fin:
MsgBox "Somme non valide !" & vbCrLf & "Utiliser le séparateur décimal de votre système comme par exemple la virgule."
End Sub |
Partager