The information in this article applies to:
SUMMARYThe Microsoft Knowledge Base contains a number of articles that include sample code for Visual Basic for Applications macros. Many of these macros illustrate basic concepts of programming in Visual Basic for the various Office 2000 applications. 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 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 a Microsoft Certified Solution Provider
or the Microsoft fee-based consulting line at (800) 936-5200. For more information about
Microsoft Certified Solution Providers, please see the following page on the World Wide Web:
http://www.microsoft.com/mcsp/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.aspTo use the sample code from a Knowledge Base article, you must add a new Visual Basic macro (or select an existing macro). You can then copy/paste or type the sample code into this macro by using any of the following methods: To Create a New Macro
After typing or pasting the code for your macro, on the File menu, click Close and Return to Microsoft <application> where <application> is the Microsoft Office 2000 application that you are using. NOTE: Use the TAB key to indent text. Lines that begin with an apostrophe (') are comments and are not required to run the macro. However, you may want to type them in to make it easier to understand the 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:
where <application> is the Microsoft Office 2000 application that you are using. To Run the Macro
REFERENCES
Microsoft Help for each Office program contains numerous topics about
working with macros. Visual Basic Help contains extensive information about
writing your own code. Q226118 OFF2000: Programming Resources for Visual Basic for Applications Additional query words: vba vbe visual basic OFF2000
Keywords : kbmacro kbprg kbdta kbwordvba wd2000 |
Last Reviewed: July 26, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |