Question : vba extract filename from path
Answered by : vastemonde
Function GetFilenameFromPath(ByVal strPath As String) As String If Right$(strPath, 1) <> "\" And Len(strPath) > 0 Then GetFilenameFromPath = GetFilenameFromPath(Left$(strPath, _ Len(strPath) - 1)) + Right$(strPath, 1) End If
End Function
Source : https://stackoverflow.com/questions/1743328/how-to-extract-file-name-from-path | Last Update : Sun, 07 Feb 21