OFF97: How to Run Sample Code from Knowledge Base ArticlesLast reviewed: February 11, 1998Article ID: Q173707 |
The information in this article applies to:
SUMMARYThe Microsoft Knowledge Base contains a number of articles that contain sample code for Visual Basic for Applications macros. Many of these macros illustrate basic concepts of programming in Visual Basic for Microsoft Office. This article contains instructions on how to use the sample code to create a new macro, and how to run that macro.
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 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:
http://www.microsoft.com/supportnet/refguide/Microsoft Excel stores macros in workbooks; Microsoft PowerPoint stores macros in presentations, and Microsoft Word stores macros in templates and documents. To use the sample code in a Knowledge Base article, you must add a new Visual Basic macro (or select an existing macro) in an Excel workbook, PowerPoint presentation or Word template or document. You can then paste or type the sample code into this macro. Use any of the following methods.
To Create a New Macro
To Add the Sample Code to a ModuleTo add code to a module, you must either have an existing module or create a new module. To do this, follow these steps:
To Run the Macro
REFERENCESMicrosoft Help for each Office program contains numerous topics about working with macros. Visual Basic help contains extensive information about writing your own code. For additional information about getting help with Visual Basic for Applications, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q163435 TITLE : VBA: Programming Resources for Visual Basic for Applications |
Additional query words: 8.0 8.00 ppt8 vba vbe visual basic XL97
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |