Gets the file extention of a file name up to 1 million characters long.
Gets the file extention of a file name up to 1 million characters long.
Rate Gets the file extention of a file name up to 1 million characters long.
(1(1 Vote))
Dim i As Long
For i = 2 To 1000000
If Left(Right(FileName, i), 1) = "." Then
If WithDot = True Then
FileExtention = Right(FileName, i)
Else
FileExtention = Right(FileName, i - 1)
End If
Exit Function
End If
Next
End Function
---=== How to Use ===---
' To get the file extention with the dot at the left
variable = FileExtention(FILENAME, True)
' To get the file extention without the dot at the left
variable = FileExtention(FILENAME, False)
Gets the file extention of a file name up to 1 million characters long. Comments
No comments yet — be the first to post one!
Post a Comment