REFERENCE
U.MESSAGE_BOX
Summary
Displays a message in a pop-up box that must be acknowledged by the user in order to continue interacting with Excel
Syntax
Parameters
| Parameter | Required | Description |
|---|---|---|
message |
Yes | The message to be displayed in the message box |
[icon] |
No | The icon to be included in the message. The following supported: Error, Exclamation, Information, Question, Stop, None. Office icons and custom images can also be used; see info on setting images in U.MENU for details of how to specify. Default is Information if not specified |
[clickval_or_range] |
No | If set to a string value, then the message box shown will have Yes and No buttons and any call to U.GET_CLICKVAL([clickval_name]) will be updated based on what the user selects: TRUE if the user clicks Yes; and FALSE if the user clicks No. If a reference to a range ...or multiple ranges separated by commas and surrounded by parentheses... those ranges will be recalculated if the user clicks Yes in the message box. If set to a range reference ID as returned from U.RANGE_REF ...or a comma-delimited list of IDs ...the specified range(s) will have their values set to the result of the message_box: TRUE if the user clicks Yes, and FALSE if the user clicks No. However if the reference ID(s) are enclosed in "calc( |
[block] |
No | If set to TRUE then method will not be calculated unless triggered by user interaction or calculated as a step in a script; If set to a number then will be throttled to not calculate more frequently than the specified number of seconds; make number negative to prevent auto recalc of blocked methods |
Behavior
The documented public interface is supported by the current U Add-in source signature and the maintained Usage Examples workbook. Optional parameters are shown in square brackets in the syntax above; omit the brackets when entering a formula.
Return Value
Returns the function result or action status described by the formula and parameters above. The maintained sources do not define a narrower, stable return contract for this function.
Examples
Notes
- Formula examples are preserved from maintained workbook usage and normalized to the current
U.prefix. - Complete formulas demonstrate working patterns; they do not imply that undocumented option values are supported.
- Where maintained sources do not specify every accepted value, default, or error message, this page does not infer one.
- For functions that perform actions, use a visible trigger or supported block/throttle parameter to avoid unintended repetition during recalculation.
Related
- Concept: Workbook Automation
- How-to: Respond to Clicks and Notifications
- Example: Click-Driven Script