Excel does not provide a built-in way to return to the previously active worksheet. This VBA provides a method for doing this.

To use this solution, install the following code into the PERSONAL.xlsb workbook. There are three pieces of code that must be copied into three different places:

Create a new standard module with any name, and copy this code into it:
Please Login or Register  to view this content.
Create a new class called ClassSheetChangeTracker and paste the following code into it:
Please Login or Register  to view this content.
Add the following sub into the ThisWorksheet module. If you already have a sub called Workbook_Open in that module, add the line of code shown.
Please Login or Register  to view this content.