| Notes: Set strPath to the string containing the full path Public Function GetFileNameFromPath(strPath As String) As String Dim intX As Integer Dim intPlace As Integer Dim intLastPlace As Integer intLastPlace = 0 For intX = 1 To Len(strPath) intPlace = InStr(intLastPlace + 1, strPath, "\") If intPlace = 0 Then GetFileNameFromPath = Right(strPath, Len(strPath) - intLastPlace) Exit Function Else intLastPlace = intPlace End If Next intX End Function |
Get File Name From Path |
Express News India | Freelance ecommerce web development India