How to Activate an Excel Sheet using VBA?

How to Activate an Excel Sheet using VBA?
Table of Contents

Background

Navigating between Excel worksheets are one of the VBA101 questions.

Very often we will have more than one worksheet in a Excel workbook.

All you need is “Activate”.

Do you have the following questions?

  1. How to go to a specific sheet with VBA?
  2. How to activate a specific worksheet?
  3. How to select another worksheet with VBA?

In this article, I will show you how to activate a specific worksheet using VBA.

Example

Sample Workbook

Download the workbook to practice it by yourself!

VBA code

Read How to Insert & Run VBA code in Excel – VBA101 if you don’t know how to use the VBA code.

Sub Activate_Sheet()
'The script is created by Dollar Excel.
'Subscribe to Dollar Excel newsletter for more free resources like this.

Worksheets("2019 Sep").Activate

End Sub
What this code will do
  1. It will activate the worksheet you specified
  2. You can use this script multiple times to navigate between different sheets.

Customize your VBA code

To select another worksheet

Worksheets("2019 oct").Activate

Do you find this article helpful? Subscribe to our newsletter to get exclusive Excel tips!

International Open Academy

Join Our Newsletters!

JOIN OUR NEWSLETTERs!