返回列表 上一主題 發帖

檢查檔案是否存在

If Dir("C:\TEST.XLS") = Empty Then
     MsgBox "文件不存在。"
   End If
   On Error Resume Next
   Set B = Workbooks("TEST.XLS")
If Err.Number = 0 Then
        MsgBox testfile & "檔案已開啟"
    End If

TOP

        靜思自在 : 能付出愛心就是福,能消除煩惱就是慧。
返回列表 上一主題