Code:
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.FileExists(ActiveWorkbook.Path & "\" & "FileName.xls") Then
  MsgBox "File Exists!" '檔案存在
Else
  MsgBox "File Not Exists!" '檔案不存在
End If

Comment:
ActiveWorkbook.Path 目前活頁簿的路徑
FileName.xls 檔案名稱

創作者介紹
創作者 放羊的风间。。筆記本 的頭像
leftalan

放羊的风间。。筆記本

leftalan 發表在 痞客邦 留言(0) 人氣( 7510 )