Re : Liaisons cellules prioritaires
re
a essayer, n'agit que sur feuilles se terminant par AM ou MP
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
' si erreur, affichage N°
On Error GoTo Err_Workbook_SheetChange
'
Dim Plage_T As String
Dim Cel_T As Range
Dim Cel_D As Range
Dim F As Worksheet
'feuilles concernées se terminent par AM ou MP
'sortie si feuille non concernée
MsgBox ActiveSheet.Name
If Not Right(ActiveSheet.Name, 2) = "AM" And Not Right(ActiveSheet.Name, 2) = "MP" Then Exit Sub
'copie
If Intersect(Target, Range([c13], _
Cells(Range("A65536").End(xlUp).Row, Range("IV6").End(xlToLeft).Column))) _
Is Nothing Then GoTo Sort_Workbook_SheetChange
Application.EnableEvents = False
Application.ScreenUpdating = False
Plage_T = Intersect(Target, Range([c13], _
Cells(Range("A65536").End(xlUp).Row, _
Range("IV6").End(xlToLeft).Column))).Address(0, 0)
'n'agit que sur feuilles concernées (AM & MP)
For Each F In Worksheets
If Right(F.Name, 2) = "AM" Or Right(F.Name, 2) = "MP" Then
For Each Cel_D In F.Range(Plage_T)
For Each Cel_T In Target
If Cel_T.Address = Cel_D.Address Then
Cel_D = Cel_T
Exit For
End If
Next Cel_T
Next Cel_D
End If
Next F
Sort_Workbook_SheetChange:
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Err_Workbook_SheetChange:
MsgBox (Err.Number & " - " & Err.Description)
Resume Sort_Workbook_SheetChange
End Sub