Article ID: 297304 - Last Review: October 11, 2006 - Revision: 3.3 Visio2002: How to Run Sample Code from Knowledge Base ArticlesThis article was previously published under Q297304 For a Microsoft Visio 2000 version of this article, see 277011
(http://support.microsoft.com/kb/277011/EN-US/
)
.
On This PageSUMMARY
The Microsoft Knowledge Base contains many 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
Visio. 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. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to 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 requirements.
Microsoft Visio stores macros in a module within a project that is stored in a template (.vst), a stencil (.vss), or a drawing (.vsd). To use the sample code in a Knowledge Base article, you must first add a new Visual Basic macro (or select an existing macro) in a Visio template, stencil, or drawing. Then you can paste or type the sample code into this macro.
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
The macros in the project are disabled. Please refer to the online help or documentation of the host application determine how to enable macros.
For additional information, click the article number below to view the article in the Microsoft Knowledge Base: 297136
(http://support.microsoft.com/kb/297136/EN-US/
)
Visio2002: "The Macros in the Project Are Disabled" Message When You Run a Macro
REFERENCES
Microsoft Visio Help 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 forApplications, click the article number below to view the article in the Microsoft Knowledge Base: 297319
(http://support.microsoft.com/kb/297319/EN-US/
)
Visio2002: Programming Resources for Visual Basic for Applications
| Article Translations
|
Back to the top
