Hello there,
I'm working on a macro that lets me jump easily between workbooks and worksheets but I just can't seem to get it working.
The cell reference C3 contains text which decides which workbook and worksheet I want to open/activate.
Sub Open_or_Activate_pINFO()
Dim sName As String
sName = Range("C3")
On Error GoTo ErrorHandler
Workbooks.Open ("C:\Property Sheets\" & sName & ".xlsm")
'The following line will halt the macro before the error handler is reached.
Exit Sub
ErrorHandler:
Workbooks(sName & ".xlsm").Activate
Sheet("sName").Activate
End Sub
Bookmarks