VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Returns a string specifying file extension

by Kenneth G. Jarvis, CPA (2 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 19th August 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Returns a string specifying file extension

Rate Returns a string specifying file extension



On Error GoTo Error_Handler
Dim nToRight As Integer
nToRight = VBA.InStr(1, VBA.StrReverse(strSource), ".", vbTextCompare)
GetFileExtension = VBA.Right(strSource, nToRight - 1)
Exit Function
Error_Handler:
    GetFileExtension = ""
End Function


Download this snippet    Add to My Saved Code

Returns a string specifying file extension Comments

No comments have been posted about Returns a string specifying file extension. Why not be the first to post a comment about Returns a string specifying file extension.

Post your comment

Subject:
Message:
0/1000 characters