Sub GetWorkbook()
Dim wbOpen As Workbook, strWorkbook As String
' Suppress errors
On Error Resume Next
strWorkbook = "Book1" '<- change this to your workbook name
Set wbOpen = Workbooks(strWorkbook)
' Test if workbook is open
If wbOpen Is Nothing Then
' Workbook is not open
MsgBox "Can't find it, sorry!"
Else
' Workbook is open
MsgBox "I got it! Here you go!"
wbOpen.Activate
End If
On Error GoTo 0
Set wbOpen = Nothing
End Sub