'******************************判断某个文件名是否存在*******************
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
-----开博第一篇