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 -
| Click the Tools menu, point to Macro, and then click Macros. | -
| Click the name of the macro you want to debug. | -
| Click Step Into. | -
| Click the Debug menu, and then click Step Into to proceed through each action. | -
| When you're done, click the File menu, and then click Close And Return To [Program name]. | -
| Click OK to stop the debugger. | 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 -
| Click the Tools menu, point to Macro, and then click Macros. | -
| 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 Tools menu, point to Macro, and then click Visual Basic Editor. | -
| 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. | 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. | |