VBA Scripting.FileSystemObject Retrieve just the extension from a file name


Example

Dim fso As New Scripting.FileSystemObject
Debug.Print fso.GetExtensionName("MyFile.something.txt")

Prints txt Note that the GetExtensionName() method already handles multiple periods in a file name.