Article ID: 184504
Article Last Modified on 9/12/2006
-or-
Sub ActivateSheet()
' This macro assumes that there is already a workbook named 'Book2'
'either in the current folder or currently open.
On Error GoTo ErrorHandler
Workbooks("Book2").Activate
' The following line halts the macro before the error handler
' is reached.
Exit Sub
ErrorHandler:
Workbooks.Open filename:="Book2"
End Suberror handling
Additional query words: XL98
Keywords: kbhowto kbprogramming kbdtacode KB184504