sub macro12()
if range"a5000".value<>1 then
blabla(ton code)
range"a5000".value=1
end if
end sub
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Static b As Boolean
If b = True Or Target.Address <> "$C$26" Then Exit Sub
b = True
Target.Interior.ColorIndex = 3
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("AA1").value = True Or Target.Address <> "$C$26" Then Exit Sub
Range("AA1").value = True
Call macro12
End Sub
[COLOR="DarkSlateGray"][B][COLOR="SeaGreen"]'Dans le module de la feuille concernée :[/COLOR]
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$26" Then
If ActiveWorkbook.Names("Etat_C26").Value = "=0" Then
bascule_état_C26
macro12
End If
End If
End Sub
Sub bascule_état_C26()
With ActiveWorkbook.Names("Etat_C26")
If .Value = "=1" Then .Value = "=0" Else .Value = "=1"
End With
End Sub
[COLOR="SeaGreen"]'Dans le module de la feuille concernée ou dans un module standard :[/COLOR]
Sub macro12()
MsgBox "macro12 exécutée"
End Sub[/B][/COLOR]
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$6" Then
If OptionButton1 = True Then Exit Sub
OptionButton1 = True
macro12
End If
End Sub