by Opal Raj Ghimire (7 Submissions)
Category: String Manipulation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 5th July 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Returns File name or Drive name from given path in one line of code.
Dim sParts() As String
sParts = Split("C:\MyWorld\MyStyle\WhoCares\Junk.txt", "\")
'sParts(UBound(sParts)) contains File name 'Junk.txt'
'to check
MsgBox sParts(UBound(sParts))
'Drive name
MsgBox sParts(LBound(sParts))
No comments have been posted about Returns File name or Drive name from given path in one line of code.. Why not be the first to post a comment about Returns File name or Drive name from given path in one line of code..