Microsoft Office Tutorials and References
In Depth Information
Customizing the VBE Environment
h Edit and Continue section: This area contains one option, which may be useful for
debugging. When checked, VBA displays a message if your variables are about to lose
their values because of a problem.
h Error Trapping settings: These settings determine what happens when an error is
encountered. If you write any error-handling code, make sure that the Break on
Unhandled Errors option is set. If the Break on All Errors option is set, error-handling
code is ignored (which is hardly ever what you want). I discuss error-handling techniques
in Chapter 9.
h Compile settings: The two Compile settings deal with compiling your code. I keep both
of these options turned on. Compiling code is virtually instantaneous unless the project is
Figure 7-11: The General tab of the Options dialog box.
Using the Docking tab
Figure 7-12 shows the Docking tab of the Options dialog box. These options determine how the
various windows in the VBE behave. When a window is docked, it’s fixed in place along one of
the edges of the VBE window. Docking windows makes it much easier to identify and locate a
particular window. If you turn off all docking, you have a big mess of windows that are very
confusing. Generally, you’ll find that the default settings work fine.
To dock a window, just drag it to the desired location. For example, you might want to dock the
Project Explorer window to the left side of the screen. Just drag its title bar to the left, and you
see an outline that shows it docked. Release the mouse, and the window is docked.