Voici le code avec la partie manquante, pour pouvoir changer le nom de fichiers excels automatiquement
Sub Changement_nom_fichier_excel()
With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
.Show
Folder = .SelectedItems(1)
End With
File = Dir(Folder & "\", vbReadOnly)
Application.ScreenUpdating = False
Do While File <> ""
Workbooks.Open Filename:=Folder & "\" & File, _
UpdateLinks:=False
Sheets("travaux").Activate
' *************code pour changer nom de fichier*************
ActiveWorkbook.Close (SaveChanges = True)
File = Dir
Loop
Application.ScreenUpdating = True
MsgBox "Tous les noms ont été modifiés.", vbOKOnly + vbInformation
End Sub