Here is a code I use
I can't remember who I received it from
but it works great compliments from unknown
Dim wBook As Workbook
Application.ScreenUpdating = True
On Error Resume Next
Set wBook = Workbooks("Barschedulle2.xls")
If wBook Is Nothing Then 'Not open
Set wBook = Nothing
On Error GoTo 0
Else 'It is open
MsgBox "You must close down Barschedulle2 first to continue changes", _
vbInformation, "Caution"
Windows("BarScheduLLE2.xls").Activate
Exit Sub
End If
continue your code here then End sub
Thanks Johny