Parse out the filepath and filename of a string and have each returned in separate variables passed
Parse out the filepath and filename of a string and have each returned in separate variables passed in during the function call. This modifies
Rate Parse out the filepath and filename of a string and have each returned in separate variables passed
(1(1 Vote))
Dim i As Long
i = Len(FilePathAndName)
Do While Mid$(FilePathAndName, i, 1) = "\"
i = i - 1
Loop
If i = Len(FilePathAndName) Then
FileName = Mid$(FilePathAndName, InStrRev(FilePathAndName, "\") + 1)
Else
i = i + 1
End If
FilePath = Left$(FilePathAndName, InStrRev(FilePathAndName, "\", i))
End Sub
Parse out the filepath and filename of a string and have each returned in separate variables passed Comments
No comments yet — be the first to post one!
Post a Comment