README.md
December 5, 2022 ยท View on GitHub
Description
It extracts a filename from a filepath.
More Info
A string comtaining a valide path & filename
Put this function in a module or the declaration section of a form in which this function is needed.
Returns only the filename
It only works with VB6, this of the function 'StrReverse' which is not in previous versions of VB
| Submitted On | |
| By | D. de Haas |
| Level | Advanced |
| User Rating | 4.3 (170 globes from 40 users) |
| Compatibility | VB 6.0 |
| Category | VB function enhancement |
| World | Visual Basic |
| Archive File |
Source Code
Public Function ExtractFileName(ByVal strPath As String) As String
' StrReverse is only working in VB6
strPath = StrReverse(strPath)
strPath = Left(strPath, InStr(strPath, "\") - 1)
ExtractFileName = StrReverse(strPath)
End Function