open to a certain sheet tab in a different workbook

  • Thread starter Thread starter akay71
  • Start date Start date
A

akay71

Hello All,
I am try to do some coding to open to a certain tab in a different workbook.
I am creating the sheet tab name that I need to open with concatenate (the
name has three parts to it based on what the user select). The cell has a
name (sheettab1but the value in the cell will change). Is it possible to use
the value in sheettab1 to open to a certain tab in a different workbook?
Thanks
 
This assumes that the "other" workbook (a.xls) has already been opened.

We get the tab name from the Named Cell, activate a.xls and activate the
proper tab:

Sub Macro1()
s = Range("sheettab1but").Value
Windows("a.xls").Activate
Sheets(s).Activate
End Sub
 
Back
Top