PAUSE

Macro Sheets Only

Pauses a macro. Use the PAUSE function, instead of choosing the Pause button in the Single Step dialog box, as a debugging tool when you do not wish to step through a macro. You can also use PAUSE to enter and edit data, to work directly with Microsoft Excel commands, or to perform other actions that are not normally available when a macro is running.

Syntax

PAUSE(no_tool)

No_tool is a logical value specifying whether to display the Resume Macro button when the macro is paused. If no_tool is TRUE, the toolbar is not displayed; if FALSE, the toolbar is displayed; if omitted, the toolbar is displayed unless you previously clicked the close box on the toolbar.

Remarks

Tip Since the automatic Resume Macro button can be customized, you can create a custom toolbar that will appear whenever a macro pauses.

Example

The following macro formula checks to see if a variable named TestValue is greater than 9. If it is, the macro pauses; otherwise, the macro continues normally.


IF(TestValue>9, PAUSE())

Related Functions

HALT Stops all macros from running

RESUME Resumes a paused macro

STEP Turns on macro single-stepping

List of Control Functions