I am looking to create a button which when pressed will take me from my Master sheet to a sheet titled '01-03'. I have used the macro function to set this up and have the following script:
function myFunction() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('B8').activate();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('01-03'), true);
};
The script works when I go into the script and click run, when I use the CTRL+ALT+SHIFT+1 keyboard shortcut and when I click on the Tools drop down and go into the Macros drop down and find the relevant macro. The only time it doesn't work is when I click on the button I have set up as I get the following error message:
"Script function 01-03 could not be found"
I have checked and double checked that I have named the macro correctly and I've run out of ideas as to why this may be happening. Can anyone help please?