Is a specific workbook open?


Posted by Jason on February 11, 2002 1:47 PM

I need a statement that says:
If Workbook A is open then

End If

What's the code that tells me if a specific workbook is open?



Posted by DRJ on February 11, 2002 1:54 PM

Hi

Try something like this

Sub IsItOpen()

On Error Resume Next
Windows("SomeWorkbook.xls").activate
If Err <> 0 Then
Msgbox("The Workbook Is Not Open")
else
Msgbox("The Workbook Is Open !!!")
end If

Thisworkbook.activate

End Sub