Pastetool - GetFilePath

URL: , Paste another

Function GetFilePath(theFileName As String) As String
    Dim WhereSlash  As Integer
    If Right(theFileName, 1) = "\" Then GetFilePath = theFileName: Exit Function
    If Right(theFileName, 1) = ":" Then GetFilePath = theFileName: Exit Function
    WhereSlash = InStrRev(theFileName, "\")
    If WhereSlash > 0 Then
        GetFilePath = Left$(theFileName, WhereSlash)
    End If
End Function

Download code

This visual basic code was pasted on September 15, 2009




Protected with advance Anti-SPAM techniques :)
Coded and designed by Fedmich
Follow us on Twitter