Public Sub Loop_Rename_Files_in_Folder()
Dim folder As String
Dim filename As String
folder = "C:\Path to\your\folder\" 'MODIFY THIS LINE - FOLDER CONTAINING FILES TO BE RENAMED
If Right(folder, 1) <> "\" Then folder = folder & "\"
filename = Dir(folder & "*.exp")
Do While filename <> vbNullString
Name folder & filename As folder & Left(filename, InStrRev(filename, ".")) & "xls"
filename = Dir
Loop
End Sub
Public Sub Loop_Rename_Files_in_Folder2()
Dim folder As String
Dim filename As String
folder = "C:\Path to\your\folder\" 'MODIFY THIS LINE - FOLDER CONTAINING FILES TO BE RENAMED
If Right(folder, 1) <> "\" Then folder = folder & "\"
filename = Dir(folder & "*.*")
Do While filename <> vbNullString
If Right(filename, 4) <> ".xls" Then Name folder & filename As folder & filename & ".xls"
filename = Dir
Loop
End Sub