At this time, you have the option of resetting the program, stepping through the program one line at a time, or continuing normal operation of the program. Break Mode is entered when program execution proceeds to a line of code containing a breakpoint. Insert break points at locations in code where bugs are suspected or known to exist and then run the program. You can also toggle a breakpoint by clicking the left margin of the code window next to the line of code at which you want program execution to pause, or by pressing F9. To intentionally enter Break Mode, insert a breakpoint at the desired location in the program using the Debug menu item or Debug toolbar (select from the View menu) in the VBA IDE (refer to Figure 7.5). The line of code that generated the error will be highlighted as shown in Figure 7.5. While in Break Mode, program execution is paused and can be stepped through one line at a time to closely examine factors such as order of code execution and the current values stored within variables. Selecting the Debug option will load the VBA IDE and display the program in Break Mode. When your program generates a runtime error, a dialog box similar to the one shown in Figure 7.4 is displayed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |