Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Activating cell after button click (remove focus from the button)

$
0
0

I have a sheet with one button (a shape) which is associated with an Apps Script function.

enter image description here

When I click the button it inserts a row and activates a cell in that row.

enter image description here

Then if I try typing, nothing happens. I manually need to click on the new cell to be able to enter new text...

How can I change the code to be able to immediately start typing just after the click of the button (without additional click on the cell)?

function above_same_level() {  var ws = SpreadsheetApp.getActive();  var row = ws.getActiveRange().getRow();  ws.insertRowsBefore(row, 1);  ws.getRange('A'+ row).activate();};

Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>