Public Function GetFileNameFromPath(path As String) As String
Dim fileName As String
fileName = Dir(path)
If Len(fileName) > 0 Then
GetFileNameFromPath = fileName
Else
GetFileNameFromPath = "File not found"
End If
End Function
Posted inโค้ด