The information in this article applies to:
SUMMARY
In Visual Basic, Applications Edition, there is no built-in equivalent for
the MS Excel 4.0 PAUSE() macro function. The Visual Basic code in this
article provides an alternative.
MORE INFORMATIONMicrosoft 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 professionals 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: http://www.microsoft.com/support/supportnet/overview/overview.aspMicrosoft Excel does not have a "Macro Paused" Toolbar that can be invoked by a single command. This is true even when you run an MS Excel 4.0 macro. For more information on creating a macro-paused toolbar within the MS Excel 4.0 macro language, please see the following article(s) in the Microsoft Knowledge Base: Q105543 XL5: No Resume Button or Key Command for Paused .XLM MacroThe following Visual Basic code comprises two sub procedures that you can modify to create the effect of pausing a macro. If you have a single procedure within which you need to pause execution until the user desires to resume execution, split your sub procedure into two halves. On the last line of the first half of the sub procedure, call the "First_Half" sub procedure. Within the "Second_Half" sub procedure, substitute the name of the sub procedure that is the second half of your original sub procedure on the line where the MsgBox is currently located.
REFERENCESFor more information, see the Visual Basic User's Guide, Chapter 12, "Managing Toolbars and Toolbar buttons with Visual Basic" Additional query words:
Keywords : kbcode kbprg PgmHowto |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |