Starting Excel on a certain page

jyantiss

New Member
Joined
Feb 18, 2004
Messages
43
Is there a way to have an excel workbook open to a certain tab or sheet every time it is opened?

Currently, its opening to the page that was up when last saved.
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

In the THIS WORKBOOK Visual Basic window, enter this code

Code:
Private Sub Workbook_Open()
Sheets("Sheet3").Activate
End Sub

Change Sheet3 to the sheet tab you require.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,916
Office Version
  1. 365
Platform
  1. Windows
Yes, you can put some VBA code in the Workbook_Open event to do this. If you go into the VB editor, place the following code under the ThisWorkbook module:

Code:
Private Sub Workbook_Open()

    Sheets("Sheet1").Select

End Sub

Change the name of "Sheet1" to whatever the name is of the sheet you want to open to.
 

jyantiss

New Member
Joined
Feb 18, 2004
Messages
43
Thanks for your help on this,

how do I get to the 'THIS WORKBOOK Visual Basic window'

or

to the 'Workbook_Open event' ?
 

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

Select TOOLS-->MACRO-->VISUAL BASI EDITOR

In this VB window select VIEW-->PROJECT EXPLORER

A window will appear (or is already open) and should have your spreadsheet name in their, as well as all the sheets, after the last sheet there is a THIS WORKBOOK, Right Clisk the Mouse when over this and select VIEW CODE

Past the code in the large window, above should be two drop down boxes saying (General) and (Declarations)

Is this expalined well enough?
 

Watch MrExcel Video

Forum statistics

Threads
1,122,487
Messages
5,596,450
Members
414,068
Latest member
FAH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top