REFERENCE
U.SET_OPEN_VALS
Summary
If present, updates the specified range in the workbook containing the method with the specified values (blanks if no values are specified) whenever Excel's WorkbookOpen or WorkbookBeforeClose event fires
Syntax
=U.SET_OPEN_VALS(target, [values], [on_save], [post_open_values], [post_open_seconds], [post_on_save])
Parameters
| Parameter | Required | Description |
|---|---|---|
target |
Yes | The range whose values will be updated |
[values] |
No | The values to paste into the target range. Default is blanks if not provided. Do not provide any value if setting the 4th paramter to "calc()" |
[on_save] |
No | If set to TRUE then specified values are pasted into target range before the sheet is saved in addition to when it is opened or closed |
[post_open_values] |
No | If set, these values will be copied to the target range some number of seconds after the workbook first calcs after opening (values in 2nd parameter still copied immediately at open). A default delay of 3 seconds is used unless otherwise specified. If set to the special value "calc()" and no value is included in the 2nd parameter, then the target is recalculated |
[post_open_seconds] |
No | If post_open_values are set, this parameter can be set to a positive number to indicate the pause in seconds that should be applied before the post_open_values are copied to the target range. A max of 600 (ten minutes) is enforced |
[post_on_save] |
No | If set to TRUE and post_open_values are set, then the post_open_values will be copied to the target range after a delay (3 seconds unless otherwise specified) after the workbook first calcs after being saved in addition to after the workbook being opened |
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: Control Another Workbook
- Example: Remote-Controlled Workbook