Retrieve file extension only from a file
Retrieve file extension only from a file
Rate Retrieve file extension only from a file
(1(1 Vote))
'parses extension from filename and returns the extension
'no extension is sent back as """"
Dim nPosition As Integer
If InStr(1, lpFileName, ".") < 1 Then
Exit Function
Else
nPosition = InStr(1, lpFileName, ".")
GetExtension = Mid$(lpFileName, _
nPosition, _
Len(lpFileName) - (nPosition - 1))
End If
End Function
Retrieve file extension only from a file Comments
No comments yet — be the first to post one!
Post a Comment