📜  vba 从路径中提取文件名 - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:56.152000             🧑  作者: Mango

代码示例1
Function GetFilenameFromPath(ByVal strPath As String) As String
    If Right$(strPath, 1) <> "\" And Len(strPath) > 0 Then
        GetFilenameFromPath = GetFilenameFromPath(Left$(strPath, _
            Len(strPath) - 1)) + Right$(strPath, 1)
    End If
End Function