Sub Renommer()
Dim chemin$, typ$, fic$
chemin = "F:\AAA\"
typ = ".xlsm"
fic = Dir(chemin & "*" & typ)
If fic = "" Then
MsgBox "Il n'y a aucun fichier accessible de type " & typ & " dans " & vbLf & chemin
ElseIf Dir = "" Then
On Error GoTo E
Name chemin & fic As chemin & "MAJ " & Format(Date, "yyyymmdd") & typ
On Error GoTo 0
Else
MsgBox "Il y a plusieurs fichiers de type " & typ & " dans " & vbLf & chemin
End If
Exit Sub
E:
MsgBox "Impossible de renommer " & chemin & fic
Resume Next
End Sub