Shows a message box with OK or other buttons.
class Browser method .msgBox()
Browser is the Apps Script service.
.msgBox() is the method name you will see after a dot in your code.
What it does
Why it's used
- Quick OK dialog in simple scripts without custom HTML.
- Confirm an action in older or lightweight workflows.
Common errors
- Forgetting parentheses on msgBox. Write Browser.msgBox(), not Browser.msgBox or msgBox by itself.
- Skipping dots between chained calls. Each step needs a dot, like Browser.msgBox().
- Adding spaces where they do not belong. Write Browser.msgBox(), not Browser .msgBox(), Browser.msgBox (), or Browser . msgBox().
- Wrong capitalization. Use Browser and msgBox, not browser or msgbox.
Explore
Related methods
-
.buttons()
Returns button constants used with msgBox and inputBox.
-
.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.msgBox().
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 →How to Send Google Forms Entries Automatically with Apps Script
Google Forms provides basic email notifications for form submissions, but enhancing these notifications with detailed summaries can significantly improve productivity and response management.
Read post →Explore Coding in Google Sheets
Did you know you can actually code in Google Sheets?
Read post →