| {\rtf1\ansi\ansicpg1252\deff0\deflang1044{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}} \viewkind4\uc1\pard\f0\fs17 The following routine returns the file extension for a specified file name. \par \par \par Function FileExtension(sFileName As String) As String \par Dim lPos As Long \par \par lPos = InStrRev(sFileName, ".") \par If lPos Then \par FileExtension = Mid$(sFileName, lPos + 1) \par End If \par Exit Function \par \par ErrFailed: \par Debug.Print "Error in FileExtension: " & Err.Description \par Debug.Assert False \par End Function \par } |
Returning a file extension from a file name |
India web developer web development India | India web development company India ecommerce web developer