by JA (5 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 24th April 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Get file extension
Dim Fname As String
Dim ExtName As String
ExtName = Mid$(Fname, InStrRev(Fname, "."))
'use InStrRev() to catch the last dot (filenames can contain more than one)