I don't know what the problem could be. It works like a dandy here.
The only thing I did was save files from outlook in .htm format in the folder. I did not, and will not, download and save from the web.
See if this is any better. There in no error checking in the code so you need to add that.
Only the excel file and the files to be renamed in Folder.
Sub Rename_A()
Dim myPath As String, myfile As String
myPath = ThisWorkbook.Path & "\"
myfile = Dir(myPath)
Do While Len(myfile) > 0 And myfile <> "Change_File_Names_In_Folder.xlsm" '<----- Change to your Excel filename
Name myPath & myfile As myPath & Replace(myfile, "SOMETEST", "Test")
myfile = Dir
Loop
End Sub
Bookmarks