S
scott
Below I have a function that returns a file name when a full file path is
passed as a parameter. So for example, "c:\temp\myfile.txt" is returned as
"myfile.txt".
How can I do the same thing, except return "c:\temp\" or the path minus the
file name?
CODE *********
Function StripIt(sWhat As String)
StripIt = Right(sWhat, Len(sWhat) - InStrRev(sWhat, "\"))
End Function
passed as a parameter. So for example, "c:\temp\myfile.txt" is returned as
"myfile.txt".
How can I do the same thing, except return "c:\temp\" or the path minus the
file name?
CODE *********
Function StripIt(sWhat As String)
StripIt = Right(sWhat, Len(sWhat) - InStrRev(sWhat, "\"))
End Function