samedi 25 février 2023

How to uncheck all checkboxes on two separate rows in google sheets

I have a spreadsheet that will be used as a check sheet on an ambulance. There are two rows that have check boxes and I want to be able to have a button or a check box and set a trigger to turn these to false. I started using this and it worked the first time I used it but when I created a button and assigned the script it no longer worked.

function uncheckAllCheckboxes() {
   var range = SpreadsheetApp.getActive().getRange('A2:A45');
   var range = SpreadsheetApp.getActive().getRange('D2:D45');
   range.uncheck();
}

I have Checkboxes in cells A2 through A45 and again on D2 though D 34. I thought I had figured it out but I am still learning. Any Help would be appreciated.




Aucun commentaire:

Enregistrer un commentaire