Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Function basFileFromPath(strPath As String) As String
'Michael L. Red Tek-Tips thread222-262607
'Adapted from jon4747 and CajunCenturion
'? basFileFromPath("c:\My Documents\Ms_Access\Pervasive.MDB")
'Pervasive.MDB
'? basFileFromPath("c:\My Documents/Ms_Access/Pervasive.MDB")
'Pervasive.MDB
Dim MyFil As Variant
Dim MyPath As String
MyPath = Replace(strPath, "/", "\")
MyFil = Split(MyPath, "\")
If (Len(Trim(MyFil(UBound(MyFil)))) = 0) Then
basFileFromPath = "Invalid Path"
Else
basFileFromPath = MyFil(UBound(MyFil))
End If
End Function