「Tips/Excel/VBA/ワークブック存在確認」の編集履歴(バックアップ)一覧はこちら
追加された行は緑色になります。
削除された行は赤色になります。
&topicpath(top=Top)
&update()
#ls()
----
#asciiart(){
Dim wb As Workbook, flag As Boolean
For Each wb In Workbooks
If wb.Name = "Book1.xls" Then flag = True
Next wb
If flag = True Then
MsgBox "Book1 を開いています。", vbInformation
Else
MsgBox "Book1 は開いていません", vbInformation
End If
}
&topicpath(top=Top)
&update()
#ls()
----
#asciiart(){
Dim wb As Workbook, flag As Boolean
For Each wb In Workbooks
If UCase(wb.Name) = "BOOK1.XLS" Then flag = True
Next wb
If flag = True Then
MsgBox "Book1 を開いています。", vbInformation
Else
MsgBox "Book1 は開いていません", vbInformation
End If
}