1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Private Sub Worksheet_Change(ByVal Target As Range)
If a = True Then
a = False
Exit Sub
End If
If Target.Column = 27 And Target.Row >= 500 And Target.Row < 638 Then
If Not valeurcible = "" And Not Target.Value = valeurcible Then
Style = vbYesNo + vbDefaultButton1
Msg = "Etes-vous sûr de suprimer cette filiale"
Title = "Attention, vous être sur le point de suprimer une filiale"
Réponse = MsgBox(Msg, Style, Title)
If Réponse = vbYes Then
Exit Sub
Else
a = True
Range(adressecible).Value = valeurcible
End If
End If
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
adressecible = Target.AddressLocal(True, True)
valeurcible = Target.Value
End Sub |