Controlling a Macro


If a macro doesn't work exactly the way you want it to, you can fix the problem using Microsoft Visual Basic for Applications (VBA). VBA allows you to debug, or repair, an existing macro so that you change only the actions that aren't working correctly. All macros for a particular presentation are stored in a macro module, a collection of Visual Basic programming codes that you can copy to other presentation files. You can view and edit your Visual Basic modules using the Visual Basic editor. By learning Visual Basic you can greatly increase the scope and power of your programs.

Debug a Macro Using Step Mode


Click the View or Developer tab.

Click the Macros button.

Click the name of the macro you want to debug.

Click Step Into.

The Microsoft Visual Basic window opens.

Click the Debug menu, and then click Step Into (or press F8) to proceed through each action.

  • Use other commands like Step Over and Step Out to debug the code.

When you're done, click the File menu, and then click Close and Return to Microsoft PowerPoint.

Click OK to stop the debugger.

Did You Know?

You can display the Debug toolbar. In the Visual Basic editor, click the View menu, point to Toolbars, and then click Debug.


Edit a Macro


Click the View or Developer tab.

Click the Macros button.

Click the name of the macro you want to edit, and then click Edit.

Click the Module window containing the Visual Basic code for your macro.

Type new Visual Basic commands, or edit the commands already present.

Click the File menu, and then click Close and Return to Microsoft PowerPoint.

Copy a Macro Module to Another Presentation


Open the presentation files you want to copy the macro from and to.

Click the Developer tab.

Click the Visual Basic button.

Click the View menu, and then click Project Explorer.

Drag the module you want to copy from the source presentation to the destination presentation.

Click the File menu, and then click Close and Return to Microsoft PowerPoint.



Microsoft Office PowerPoint 2007 On Demand
Microsoft Office PowerPoint 2007 On Demand
ISBN: 0789736438
EAN: 2147483647
Year: 2006
Pages: 348

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