您的位置:首页 > 编程语言 > VB

VBA------ 判断某个文件是否存在函数

2009-06-28 21:48 459 查看
'******************************判断某个文件名是否存在*******************
Function IsExsitFile(ByVal filename As String) As Boolean
Dim sCurrentPath As String
Dim sCombineFilePath As String
Dim sDir As String
sCombineFilePath = ActiveWorkbook.Path & "/" & filename
sDir = Dir(sCombineFilePath)
If VBA.Len(VBA.Trim(sDir)) = 0 Then
IsExsitFile = False
Else
IsExsitFile = True
End If
End Function

-----开博第一篇
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐