When you get a run-time error, click the “Debug” button in the dialog box that shows the error. This brings you to the VB editor, and the editor highlights the line in question in yellow.
At this point, the program has paused. This means that even though the code is not running, it is merely “sleeping”. All the variables are still intact. This gives you a chance to examine the values of variables so you can figure out what went wrong. More on this in a later section.