0

Is it possible to assign two function names into a single custom menu item like this script:

function onOpen() {

    var menuItems = [
    {name: 'Draw Borders', functionName: 'borders'},
    {name: 'Draw Borders_1stFloor', functionName: 'borders1stFloor'},
    {name: 'Draw Borders_2ndFloor', functionName: 'borders2ndFloor'}
]; SpreadsheetApp.getActiveSpreadsheet().addMenu('Weekened_Functions', menuItems);

I would like to keep one menu item 'Draw Borders' and associate with it the three functions ('borders'+'borders2ndFloor'+'borders1stFloor')

1 Answer 1

0

Short answer: It's not possible.

Instead, from the menu item call a function that calls the functions that you want to be executed. Example:

function main(){
  borders();
  borders2ndFloor();
  borders1stFloor();
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.