Running Macros--Manually

Running Macros—Manually

You can run macros automatically at the click of a button or the selection of a menu item, which we’ll discuss later in this chapter. You can also manually run macros, which is a great way to verify that they work before you foist them upon your defenseless assistants and team members.

To manually run a macro, follow these steps.

  1. Choose Tools Ø Macro Ø Macros to open the Macros dialog box, shown in Figure 24.2. By default, macros from all open project files, including the global file, are displayed.

  2. Pull down the Macros In list and then select where you’ve stored the macro: in All Open Projects, in the Global Template, or in This Project.

  3. Select the macro you want to run from the list.

  4. Click the Run button to execute the macro. When the macro is finished running, Project returns control to you.

    Warning 

    You can’t enter text or choose menu options while the macro is executing.

    Warning 

    It’s always a good idea to save your project file before you run a new macro. If you’ve made a mistake during recording, the playback results may not be what you expected—and if you’ve saved your file beforehand, you can always revert to the saved version.

    click to expand
    Figure 24.2: Run your macros directly from the Macros dialog box.

If you recorded the macro correctly, your Gantt charts will now be changed to display resource initials to the right of each bar.

If you didn’t get this result, you may have recorded the macro incorrectly. Repeat the above steps—slowly and carefully, this time—to re-record the macro under the same name.

start sidebar
Mastering Troubleshooting: Pulling the Plug: Terminating a Macro During Execution

It’s possible to accidentally create a macro that won’t be able to run to completion because it gets caught in a loop. This typically happens when you make a logical or typing error when creating a macro in Visual Basic; it’s less likely to happen if you make a mistake using the Macro Recorder.

When a macro won’t stop on its own, you need to be able to terminate it. If you need to stop a macro during execution, press Ctrl+Break. (On most keyboards the Break key is shared with the Pause key.) A Visual Basic dialog box opens, allowing you to end program execution or debug the macro in the Visual Basic Editor.

If Ctrl+Break doesn’t stop macro execution, press Ctrl+Alt+Del once to open the Windows Task Manager dialog box. Select the application that contains the macro, and click the End Task button. When you reopen the application, you’ll probably need to revert to the copy of the document that you saved before running the macro.

end sidebar



Mastering Microsoft Project 2002
Mastering Microsoft Project 2002
ISBN: 0782141471
EAN: 2147483647
Year: 2006
Pages: 241

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net