I have a Google macro in which I do a few things, then want to end the script in an activated cell so the user can immediately begin typing in the activated cell (without clicking it).
I do some positioning things before activating the final cell because I want the user to see a few lines above the desired entry cell. Visually this all works great and looks the way I want it. And the cell looks activated. But upon completion of the macro, user can't type in the cell without clicking in it.
This is the macro's last 4 lines (without the flush/sleep the final scroll/screen position will not be the way I want it):
spreadsheet.getActiveCell().offset(-8,0).activate(); SpreadsheetApp.flush(); // see next line Utilities.sleep(1000); // wait so scrolling won't be reset spreadsheet.getActiveCell().offset(11,0).activate(); };