Previous Document Next Document

Getting started with macros : Using the Macro Editor


Using the Macro Editor

CorelDRAW provides an integrated development environment (IDE) for creating VBA macro projects. Called the Macro Editor, this IDE is similar to the one included with the full version of Visual Basic. You can use the Macro Editor to perform various tasks related to VBA macros, such as the following:

 
browsing the contents of a VBA macro project
 
developing and debugging VBA macro code
 
setting object properties for VBA macros
 
creating dialog boxes or “forms” for VBA macros

 
You cannot use the Macro Editor to compile executable (EXE) program files.

The Macro Editor features three main areas:

 
Project Explorer — lets you browse macro projects and their contents. For more information, see Using the Project Explorer.
 
Code window — lets you work with macro code. For more information, see Using the Code window.
 
Properties window — lists all editable properties for the selected object. For more information, see Using the Properties window.

The Macro Editor also features four main toolbars:

 
Standard toolbar — is the default toolbar
 
Debug toolbar — contains buttons for common debugging tasks
 
Edit toolbar — contains buttons for common code-editing tasks
 
UserForm toolbar — contains buttons specific to designing dialog boxes

For more information on these toolbars, see Using the Macro Editor toolbars.

The Macro Editor (CorelDRAW version shown) features the following:
1) Project Explorer; 2) Code window; 3) Properties window;
4) Standard toolbar; 5) Debug toolbar; 6) Edit toolbar;
7) UserForm toolbar

The Macro Editor also lets you access the Object Browser, which displays the entire object model of each referenced component and of the host application. For more information, see Using the Object Browser.

Although the Macro Editor opens in a separate window from its host application, it runs within the process of that application. To display the Macro Editor, do any of the following:

 
Click Tools } Macros } Macro Editor on the main menu in the application.
 
Click the Macro Editor button on the Macros toolbar.
 
Right-click Visual Basic for Applications in the Macro Manager docker, and then click Show IDE.
 
Press Alt + F11.

 
To switch between the Macro Editor and the application, use the Windows taskbar, or press Alt + F11 or Alt + Tab.

For more detailed information on constructing code procedures and setting properties, please see the Microsoft Visual Basic for Applications Help file, which is available from the Help menu in the Macro Editor.

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.