Microsoft KB Archive/105543
XL: No Resume Button or Key Command for Paused .XLM Macro
Last reviewed: February 2, 1998
The information in this article applies to:
In Microsoft Excel versions 5.0 and later, you cannot restart a paused Microsoft Excel 4.0 (.XLM) macro if you do not have a mouse. Additionally, when your macro pauses, there is no Resume command available, and the Resume Macro button is not automatically displayed to resume your paused macro.
In versions of Microsoft Excel earlier than 5.0, you can click Resume on the Macro menu to restart a paused .XLM macro. You can also click the Resume button on the Macro Paused toolbar that automatically appears when your macro is paused.
However, these options are not available in Microsoft Excel versions 5.0 and later.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
NOTE: It is not possible to restart a paused .XLM macro if you do not have a mouse. In this case, you must exit Microsoft Excel in order to terminate the macro. To restart a paused .XLM macro, you must use the Resume Macro button located on the Visual Basic toolbar. You can do this by using either of the following methods:
If the Visual Basic toolbar is not visible on the screen when your macro is paused, you will need to display it before you can restart your macro. To display the Visual Basic Toolbar, do the following:
Another method for displaying the Resume Macro button in Microsoft Excel 5.0 and 7.0 is to create a new toolbar that contains the Resume Macro button, and then modify your macro to display and hide the toolbar. To use this method, follow these steps:
2 In the Categories list, select Macro. Drag the Resume Macro button (||)
from the Buttons group to the new toolbar. Close the Customize dialog box.
On the Insert menu, point to Macro, and then click Module. On the Tools menu, click Attach Toolbars. In the Custom Toolbars list, select Macro Paused. Click Copy to add Macro Paused to the Toolbars In Workbook list. In the Attach Toolbars dialog box, click OK. On the Edit menu, click Delete Sheet to remove the empty module sheet from your workbook. The Macro Paused toolbar is now contained in the workbook. To use the Macro Paused toolbar in your macro, modify your macro using the following commands to display and hide the Macro Paused toolbar:
A1: =SHOW.TOOLBAR("Macro Paused",TRUE) A2: =PAUSE() A3: =SHOW.TOOLBAR("Macro Paused",FALSE)
Explanation of the Macro
A1: This command displays the Macro Paused toolbar A2: This command pauses your macro A3: This command hides the Macro Paused toolbar when the macro is resumed
"User's Guide," version 5.0, page 632
Additional query words: 5.00 5.00c 7.00 7.00a XL98 XL97 XL7 XL5 pause()
Last reviewed: February 2, 1998