Change Tab Detection on Google Spreadsheet using onSelectionChange Event Trigger with Google Apps Script – submit.md
An example script from Kanshi TANAIKE which lets you test the new onSelectionChange(e)
simple event trigger in Google Sheets.
The
onSelectionChange(e)
trigger runs automatically when a user changes the selection in a spreadsheet.
In the example shared this is used to detect the user changing Google Sheet tab.
![](https://pulse.appsscript.info/files/2022/06/2022-GDE-Workspace-Profile-Badge.jpg)
Member of Google Developers Experts Program for Google Workspace (Google Apps Script) and interested in supporting Google Workspace Devs.