Activate or Navigate to a Worksheet using Macros VBA in Excel

Add to Favorites

Make a particular worksheet visible using a macro in Excel.

This is called activating a worksheet and is rather easy to do.


Activate Worksheet by Name

Activate Worksheet by Index Number


Activate Worksheet by Name

Let's navigate to, activate, the worksheet called "Sheet2".



Worksheets("Shee2") is how we reference the sheet to which we want to navigate.

Sheet2 is the name of the sheet to which we want to navigate. Make sure to surround it with double quotation marks.

Activate is what actually takes the user to that worksheet.

Putting it all together, we get: Worksheets("Sheet2").Activate

It's as simple as that.

Activate Worksheet by Index Number

This time, let's navigate to the second worksheet using its index number.

All we do is to replace "Sheet2" from the last example with 2.



2 is the index number of the desired worksheet and Activate is what takes us to the desired worksheet.

This example can be confusing if you are not used to using index numbers, but index numbers are really helpful when you have to do something like loop through all of the worksheets in the workbook.


Basically, just reference the desired worksheet, however you want, and then type .Activate after it.

You should not use the Activate feature to navigate to a worksheet so that you can get data from it or put data into it. This is very bad Macro/VBA design and it will make your life hell later on. To get data from separate worksheets, read this tutorial: Select Data from Separate Worksheets with Macros VBA in Excel.

This feature should be used when you want the user to end up on a specific worksheet.

Make sure to download the sample file attached to this tutorial so that you can see this macro in Excel and work with it.

Downloadable Files: Excel File

Question? Ask it in our Excel Forum

Our Excel Courses

  • Skill Level: All Levels
  • |
  • 5 hours+

How to make a fully featured professional form in Excel that is unbreakable. This includes how to use the form to store, view, edit, and delete data from a data storage worksheet.

  • Skill Level: All Levels
  • |
  • 2 hours

Send Emails from Excel using VBA and Macros. This course starts from the Basics and builds up to more advanced examples with attaching workbooks, worksheets, PDF's, automatically sending emails, including a signature, error handling, increasing speed, and more.

Similar Content on TeachExcel
Copy and Paste Data using Macro VBA in Excel
Tutorial: How to copy and paste data using a Macro in Excel. I'll show you multiple ways to do this,...
Select Data from Separate Worksheets with Macros VBA in Excel
Tutorial: Select data from other worksheets with Macros and VBA without navigating to those workshee...
Get the Last Row using VBA in Excel
Tutorial: (file used in the video above) How to find the last row of data using a Macro/VBA in Exce...
Login to a Website using a Macro
: Connect and login to a website using a macro in Excel. This allows you to open a website a...
Get the Name of a Worksheet in Macros VBA in Excel
Tutorial: How to get the name of a worksheet in Excel using VBA and Macros and also how to store tha...
Guide to Creating Charts with a Macro in Excel
Tutorial: How to add, edit, and position charts in Excel using VBA. This tutorial covers what to do ...