The following Google Apps Script code is designed to switch the active sheet that the user is currently looking at to that of another within the same Google Sheet file. This is a snippet of code that could be placed at the end of a function when archiving data from one sheet to another for instance, and you want the destination to be shown to the user.
Apps Script Code to switch the active view for a user |