Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim xcell As Range
If ActiveSheet.Shapes("btCopie").TextFrame2.TextRange Like "*tif" Then
Application.ScreenUpdating = False
For Each xcell In Target
If xcell.Address <> [m19].Address Then xcell = Range("m19").Value
Next xcell
End If
End Sub
Sub Cliquer()
Dim shp As Shape
Set shp = ActiveSheet.Shapes("btCopie")
With shp
If .TextFrame2.TextRange Like "*tif" Then
.Fill.ForeColor.RGB = RGB(221, 221, 221)
.TextFrame2.TextRange = "Mode copie valeur M19" & vbLf & "Inhibé"
Application.Cursor = xlDefault
Else
.Fill.ForeColor.RGB = RGB(255, 0, 0)
.TextFrame2.TextRange = "Mode copie valeur M19" & vbLf & "Actif"
DoEvents: Beep
Application.Cursor = xlNorthwestArrow
End If
End With
End Subb