Controlling a Macro

If a macro doesn't work exactly the way you want it to, you can fix the problem without re-creating the macro. Instead of recording the macro over again, PowerPoint allows you to debug , or repair, an existing macro so that you change only the actions that aren't working correctly. When you use the Macro Recorder, you are actually writing a program in a programming language called Microsoft Visual Basic. 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

graphics/one_icon.jpg

Click the Tools menu, point to Macro, and then click Macros.

graphics/tow_icon.jpg

Click the name of the macro you want to debug.

graphics/three_icon.jpg

Click Step Into.

graphics/foure_icon.jpg

Click the Debug menu, and then click Step Into to proceed through each action.

graphics/five_icon.jpg

When you're done, click the File menu, and then click Close And Return To [Program name].

graphics/six_icon.jpg

Click OK to stop the debugger.

graphics/13inf13.jpg

Did You Know?

You can display the Debug toolbar . Click the View menu, point to Toolbars, and then click Debug.

You can use the Visual Basic editor to help correct macro problems . If a problem occurs while you step through a macro, you have probably discovered why your macro isn't working. You can correct the problem using the Visual Basic editor.

Edit a Macro

graphics/one_icon.jpg

Click the Tools menu, point to Macro, and then click Macros.

graphics/tow_icon.jpg

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

graphics/three_icon.jpg

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

graphics/foure_icon.jpg

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

graphics/five_icon.jpg

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

graphics/13inf14.jpg

Copy a Macro Module to Another Presentation

graphics/one_icon.jpg

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

graphics/tow_icon.jpg

Click the Tools menu, point to Macro, and then click Visual Basic Editor.

graphics/three_icon.jpg

Click the View menu, and then click Project Explorer.

graphics/foure_icon.jpg

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

graphics/five_icon.jpg

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

graphics/13inf15.jpg

Did You Know?

You can get help with Visual Basic . To learn more about Visual Basic, place your macro in Edit mode, click the Help menu, and then click Microsoft Visual Basic Help.



Show Me Microsoft Office PowerPoint 2003
Show Me Microsoft Office PowerPoint 2003 (Show Me Series)
ISBN: 078973009X
EAN: 2147483647
Year: 2002
Pages: 271

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