Dim fso As New Scripting.FileSystemObject Debug.Print fso.GetBaseName("MyFile.something.txt")
Prints MyFile.something
MyFile.something
Note that the GetBaseName() method already handles multiple periods in a file name.
GetBaseName()