Sometimes you need to open your workbook be started on a specific worksheet. With this macro, if a user is working with your workbook, they can’t go astray because the workbook starts on the exact worksheet it needs to.
Table of Contents
Macro Code
Private Sub Workbook_Open() 'Step 1: Select the specified sheet Sheets("Sheet2").Select End Sub
How This Macro Works
This macro uses the workbook’s Open event to start the workbook on the specified sheet when the workbook is opened.
The macro explicitly names the sheet we want to jump — Sheet2, in this case, when it’s opened.
How to Use This Macro
To implement this macro, you need to copy and paste it into the Workbook Open event code window. Placing the macro here allows it to run each time the workbook opens.
- Activate the Visual Basic Editor by pressing
ALT+F11
. - In the Project window, find your project/workbook name and click the plus sign next to it in order to see all the sheets.
- Click ThisWorkbook.
- Select the Open event in the Event drop-down list.
- Type or paste the code in the newly created module, modifying the sheet name (if necessary) .