Private Sub Worksheet_Activate()
Dim iYear, iMonth
With Worksheets("donnees")
If Not IsDate(.Cells(1)) Then Exit Sub
iMonth = Format(Month(.Cells(1)), "00")
iYear = Year(.Cells(1))
End With
MsgBox "Mois : " & iMonth & vbCrLf & "Année : " & iYear
End Sub