Sub IsBookOpend() On Error Resume Next Open "C:\Book1.xls" For Append As #1 Close #1 If Err.Number > 0 Then MsgBox "すでに開かれています" Else MsgBox "ブックは開かれていません" End If End Sub
Sub IsBookOpend() On Error Resume Next Open "C:\Book1.xls" For Append As #1 Close #1 If Err.Number > 0 Then MsgBox "すでに開かれています" Else MsgBox "ブックは開かれていません" End If End Sub