devxlogo

Extract the Extension of a Filename

Extract the Extension of a Filename

Extracting the extension of a filename is a requirement in many file searches and file I/O related applications. A simple way to do this is to use the split function. The following function returns the extension of the filename that is being passed to it:

 Function fileextension(sfilename As String) As String    Dim Sextension  As Variant    extension = Split(sfilename,

devx-admin

Share the Post: