Customizations for Rational Rhapsody VBA Macros window The VBA Macros window enables you to run, edit, or delete a macro. To open the Macros window, use the VBA Toolbar shortcut or select Tools > VBA > Macros . The following figure shows the Macros window. The window contains the following fields: Љ Macro Name contains the name of the highlighted macro in the Macro Box field. This field is blank if there are no macros in the Macro Box . Љ Macro Box lists the available macros in the VBA project selected in the Macros In box. Љ Macros In lists the available VBA projects that contain macros. The window contains the following buttons: Љ Run runs the selected macro.
To run a macro, highlight a macro in the Macro box, then click Run. Љ Step Into highlights the first line of the macro and places the Current Execution Line Indicator. Љ Edit opens the Code window with the selected macro visible so you can modify your macro. To edit a macro, highlight the macro in the Macro box, then click Edit . Љ Create opens a module in the Code window so you can create a new macro. To create a macro, type in a new name in the Macro Name field, then click Create . Note: Since VBA macros are contained in modules, you must first create a module before creating your first macro. If you have not yet created a module, the Create button is disabled.
Modules cannot be created from the Macros window. You must open the VBA IDE to do so. Љ Delete removes the selected macro from your project. To delete a macro, highlight a macro in the Macro box, then click Delete . Saving your macros Rational Rhapsody VBA macros are saved automatically with your Rhapsody project. When you load the project again, the macros you have created for it will be available. 484 User Guide