Function WorkbookExists(sWbName As String) As Boolean
'Returns True if workbook is open
Dim oWb As Workbook
On Error Resume Next
Set oWb = Workbooks(sWbName)
WorkbookExists = Not CBool(Err.Number)
On Error GoTo 0
End Function
Dick,
Although this is less readable, it’s faster and a bit shorter:
Or faster yet: