I’m trying to create a project that has too many sheets, so to easily navigate through those sheets, I decided to create a drop down list with all of the sheet names and to create a button to go to the selected sheet.
dropdown list with the button to access other sheets
Below is my script:
function openTab() {
var ss=SpreadsheetApp.getActiveSpreadsheet();
var form=ss.getSheetByName("REGISTRY");
var landing=form.getRange("I11").getValue();
var datasheet=ss.getSheetByName(landing);
datasheet.activate();
}
When I try to run this script, it returns this error:
TypeError: Cannot read properties of null (reading ‘activate’)
“REGISTRY” is the name of the sheet which has the dropdown, and “I11” is the exact cell where the dropdown is located.
ciannerg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.