Open file to specific tab

G

goldcomac

Is it possible to make a document open to a certain tab and a specific
cell? I manage a workbook and share it with a large number of people
and would like it to always open to the "Instruction" tab and cell A1.

Thank you.

Chip
 
M

michaelberrier

To make sure it always opens where you want, do these two things:
1. Open the VBA editor and put this in the ThisWorkBook code module:

Private Sub Workbook_Open()
Application.Run "InstructionSheet"
End Sub

2. Put this into a regular module:

Sub InstructionSheet()
Sheets("Instruction").Range("A1").Select
End Sub

That ought to do it.
 
G

goldcomac

michaelberrier said:
To make sure it always opens where you want, do these two things:
1. Open the VBA editor and put this in the ThisWorkBook code module:

Private Sub Workbook_Open()
Application.Run "InstructionSheet"
End Sub

2. Put this into a regular module:

Sub InstructionSheet()
Sheets("Instruction").Range("A1").Select
End Sub

That ought to do it.

How about doing it without using VBA? I've never used it before. I
don't know if it's difficult to use or not, it's just that I'm not
familiar with it.
 
M

michaelberrier

That's the only way to do it that I know of. This particular operation
in VBA is really simple.
In the Excel window, type Alt+F11 to open the VBA editor. From there,
just copy and paste the code below.
 
D

Dave Peterson

Instead of using Application.run, I think I'd use:

Private Sub Workbook_Open()
Call InstructionSheet
End Sub

Or just drop the workbook_Open event and use Auto_Open:

Sub Auto_Open
with Sheets("Instruction")
.select
.Range("A1").Select
end with
End Sub

(If Instruction isn't the activesheet, then the code to select A1 will fail.)
 
Top