Returns button constants used with msgBox and inputBox.
class Browser method .buttons()
Browser is the Apps Script service.
.buttons() is the method name you will see after a dot in your code.
What it does
Why it's used
- Pass YES_NO or OK_CANCEL into msgBox and inputBox.
- Build confirm-or-cancel flows with standard buttons.
Common errors
- Forgetting parentheses on buttons. Write Browser.buttons(), not Browser.buttons or buttons by itself.
- Skipping dots between chained calls. Each step needs a dot, like Browser.buttons().
- Adding spaces where they do not belong. Write Browser.buttons(), not Browser .buttons(), Browser.buttons (), or Browser . buttons().
- Wrong capitalization. Use Browser and buttons, not browser or buttons.
Explore
Related methods
-
.msgBox()
Shows a message box with OK or other buttons.
-
.inputBox()
Shows a dialog that asks the user to type a response.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.
Related blog posts
Written guides about Browser.buttons().
What's Better Than Google Sheets?
Nothing is better than Google Sheets. You just need to learn more about the unlimited power of Google Sheets. Functions, Formulas, Apps Script and more.
Read post →Explore Coding in Google Sheets
Did you know you can actually code in Google Sheets?
Read post →Extract URLs from Google Sheets
Extract url from hyperlink google sheets.Skip the Command K. This Google Sheet tutorial will make it easier for you to extract URLS from Google Sheets.
Read post →