Chapter 30. Automating Your Work with Macros

ONE of the easiest ways to increase your day-to-day productivity with Microsoft Project 2010 is to use macros. A macro can automate repetitive, tedious, or complex tasks, which frees your time and brainpower for actually managing your projects.

This chapter provides a basic understanding of what macros are and how you can create them to automate tasks you need to do frequently. Typically, you create a macro by recording the incremental steps in any given activity in Project 2010. This means that little (if any) programming is required to create a macro.

Understanding Macros

Washing the dishes—what a chore. Pick up a dirty plate, wash it with soapy water, rinse it off, and then dry it. It’s the same every time. But with a dishwasher, all the tedium of washing, rinsing, and drying is handled by the machine, leaving you free to do better things with your time. In much the same way, suppose you need to format and print a certain report every Friday. You don’t want to perform the same tedious series of commands week after week; you just want your report ready before the meeting. What you need is a macro.

What Is a Macro?

Basically, a macro is a shortcut that performs a series of commands. Rather than manually performing each step necessary to complete a task, you tell the software what each step is, what needs to be accomplished in each step, and in what order the steps must occur. Then you designate a way to set this series of commands in motion.

To do this in Project 2010, you have Microsoft Visual Basic for Applications (VBA), a subset of the highly popular Microsoft Visual Basic programming language. VBA is a macro language that is not only powerful but easy to understand and use. What’s more, the tools available in Project 2010 make creating macros as easy as can be. Most macros can be created without ever seeing, much less writing, VBA code.

Why Use Macros?

When you use Project 2010 (or any other business productivity software), you use it because it makes doing your job easier and more efficient. One of the reasons that software can make you more productive is that its features and commands are, in a sense, a collection of macros that accomplish tasks associated with the business of the software. These “macros” perform tasks that software designers learned their customers want to do. But what the designers can’t do is create all the features that every customer wants. This is where macros can prove so useful.

Because individual users can create a macro to accomplish some particular task, you can essentially customize the software by adding features that support the particular way you do your job.

For example, let’s say that you have to print that report every Friday. Before you can print anything, you have to do the following:

  • Choose the appropriate view of your project data.

  • Choose among several filters to exclude unwanted tasks.

  • Choose how to sort the data.

  • Choose the report format you need.

After you open the project plan, you might have to click your mouse well over a dozen times before you can print the report. With a macro to perform all those steps for you, printing the report is reduced to just a few mouse clicks.

Just because macros can be used to perform a complex series of steps doesn’t mean that every macro has to be elaborate. Maybe you have certain simple things you do in Project 2010 all the time, such as turn the Planning Wizard on or off. By recording a macro and adding it to a custom group on the ribbon, you have a convenient one-click method for turning the Planning Wizard on or off.

Note

For more information about adding a macro to a custom group on the ribbon, see Adding Macro Commands to the Ribbon.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.174.23