หาชื่อไฟล์จาก path

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
This entry was posted in โค้ด. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *