Simple Reset and activate a cell for the next input

19 views
Skip to first unread message

AV TL

unread,
Oct 22, 2024, 4:26:14 AMOct 22
to Google Apps Script Community
This might be an extremely simple question:  After I click on Reset Button, I activate cell C5.
When I try to scan the next item, my button get activated.

function reset_barcode() {
 
//clears barcode which was scanned
var pricesheet=SpreadsheetApp.getActiveSpreadsheet();
var priceform=pricesheet.getSheetByName("FORM");
var D_Range=priceform.getRange("C5");


priceform.getRange("C5").clear({contentsOnly: true, skipFilteredRows: true}); //Clears barcode in C5
priceform.getRange("C5").setBackground('#00DFFF');
priceform.setActiveSelection(D_Range);
return true;

}

Reply all
Reply to author
Forward
0 new messages