XL: Can't Step Through Excel 4.0 Macro If Dialog Box Visible

ID: Q106005


The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for the Macintosh, versions 5.0, 5.0a
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a


SYMPTOMS

In Microsoft Excel versions 5.0 and 7.0, it is not possible to step through a Microsoft Excel 4.0 macro while a custom dialog box is displayed on the screen.


STATUS

Microsoft has confirmed this to be a problem in the versions of Microsoft Excel listed at the beginning of this article. This problem was corrected in Microsoft Excel 97 for Windows and Microsoft Excel 98 Macintosh Edition.


MORE INFORMATION

In Microsoft Excel versions 5.0 and 7.0, when you step through a Microsoft Excel 4.0 macro, one of the following situations may occur:

  • When a custom dialog box is displayed by the SHOW.DIALOG() command, Microsoft Excel exits step mode and closes the Single Step window before showing the dialog box.


  • -or-

  • If a custom dialog box is visible on the screen, if you run the Microsoft Excel 4.0 macro STEP() macro command, you will receive an error message and the macro will halt.


  • -or-

  • If a Microsoft Excel 4.0 macro command fails while a custom dialog box is showing, the Step button in the Single Step dialog box will be unavailable (dimmed).


  • -or-

  • If the dialog box was displayed by a SHOW.DIALOG() command while in step mode, Microsoft Excel will return to step mode when the dialog box is finally dismissed.


Because it is not possible to step through a Microsoft Excel 4.0 macro while a custom dialog box is showing on the screen, you will need to debug the macro before you run the actual dialog box. To debug a Microsoft Excel 4.0 macro that is called from an item in a custom dialog box, follow these steps:

  1. Select the item in the dialog sheet.


  2. On the Tools menu, click Macro.

    Microsoft Excel will display the Macro dialog box and will insert the reference of the item's macro into the Macro Name/Reference box.


  3. In the Macro dialog box, click Step.



REFERENCES

"Visual Basic User's Guide", version 5.0, pages 234-239

Additional query words: 5.00a 5.00c 7.00a XL7 XL5

Keywords : kbprg PgmOthr kbprb
Version : MACINTOSH:5.0,5.0a; WINDOWS:5.0,5.0c,7.0,7.0a
Platform : MACINTOSH WINDOWS
Issue type : kbbug


Last Reviewed: October 25, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.