Do you often need to manipulate filenames in VBA ?Here’s a small set of very useful functions that I regularly use: GetFileExt
1 |
Public Function GetFileExt(ByRef psFilename As String) As String |
Get the file extension part of a filename, without the leading dot (“.”). Example (type in immediate window):
1 2 3 4 |
?GetFileExt("test.txt") txt ?GetFileExt("https://www.example.com/index.html") html |
StripFileExt
1 |
Public Function StripFileExt(ByRef psFilename As String) As String |
Get the left part of a filename (and path), without… Continue reading Manipulating filenames in Excel or Access, or VB/A
Recent Comments