// Kurt Kaiser // kurtkaiser.us // All Rights Reserved, 2019 var scriptProperties = PropertiesService.getScriptProperties(); function onOpen(){ var ui = SpreadsheetApp.getUi(); var response = ui.prompt('What is your favorite color?', ui.ButtonSet.OK); scriptProperties.setProperty('color', response.getResponseText()); ui.alert('Favorite color: ' + scriptProperties.getProperty('color')); } function myAlert(){ var ui = SpreadsheetApp.getUi(); ui.alert('Favorite color: ' + scriptProperties.getProperty('color')); }