Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Not UCase(Sh.Name) Like "BUDGET*" Then Exit Sub
Dim r As Range, bdc, dat, i As Variant
With Sheets("SUIVI BDC")
Set r = .Columns(Application.Match(Sh.Name, .Rows(1), 0))
'On Error Resume Next 'si aucune SpecialCell
For Each r In r.SpecialCells(xlCellTypeConstants)
If LCase(r) = "x" Then
bdc = Intersect(r.EntireRow, .Columns(4))
dat = Intersect(r.EntireRow, .Columns(6))
i = Application.Match(bdc, Sh.Columns(3), 0) 'recherche en colonne C
If IsError(i) Then i = Sh.Range("C11:C18,C20:C32,C34:C44").Find("", , xlValues).Row
If IsDate(dat) Then Sh.Cells(i, 2) = CDate(dat) 'date en colonne B
Sh.Cells(i, 3) = bdc 'N° de BDC en colonne C
End If
Next r
End With
End Sub