Debugging and editing a VBA macro

You can debug VBA macros. Debugging lets you step through code line by line to ensure that a macro executes properly. For example, if you are at a point in the code where a variable is about to be assigned a value, you can step into this line of code to determine the value of the variable at runtime.

You can also edit a VBA macro. Editing a macro involves going directly to start of the code, whereas debugging lets you step through each line of the code.


To debug a VBA macro

Wordperfect Quattro Pro btnbacktotopproc Debugging and editing a VBA macro
1.
 
Click Tools Wordperfect Quattro Pro onestep Debugging and editing a VBA macro Visual Basic Wordperfect Quattro Pro onestep Debugging and editing a VBA macro Play.
2.
 
Choose a macro from the Macro name list box.
3.
 
Click Step into.
4.
 
In Microsoft Visual Basic, click Debug Wordperfect Quattro Pro onestep Debugging and editing a VBA macro Step into.
5.
 
Modify the code.

Wordperfect Quattro Pro note Debugging and editing a VBA macro

 
After you click Step into, you can position the pointer over a specific variable to determine the value of the variable. For more information about debugging in VBA, see the Microsoft Visual Basic Help in the Visual Basic Editor.

To edit a VBA macro

Wordperfect Quattro Pro btnbacktotopproc Debugging and editing a VBA macro
1.
 
Click Tools Wordperfect Quattro Pro onestep Debugging and editing a VBA macro Visual Basic Wordperfect Quattro Pro onestep Debugging and editing a VBA macro Play.
2.
 
Choose a macro from the Macro name list box.
3.
 
Click Edit.
4.
 
Edit the code as necessary.

Wordperfect Quattro Pro note Debugging and editing a VBA macro

 
For more information about editing VBA, see the Microsoft Visual Basic Help in the Visual Basic Editor.

Debugging and editing a VBA macro