Export (0) Print
Expand All

Set Visual Basic Environment Options

Office 2007

You can set the behavior and look of the Visual Basic development environment through the Options dialog box. Use the:

  • Editor tab to specify Code window and Project window settings.
  • Editor Format tab to specify the appearance of your code.
  • General tab to specify form, error handling, and compile settings for your project.
  • Docking tab to specify whether a window is attached or "anchored" to one edge of other dockable or application windows.

To set Environment options

  • On the Tools menu of the Visual Basic editor, click Options. Each option is described in the following tables.

Editor

OptionDescription
Auto Syntax CheckVisual Basic automatically verifies correct syntax after you enter a line of code.
Require Variable DeclarationExplicit variable declarations are required in modules.
Auto IndentAfter tabbing the first line of code, all subsequent lines start at that tab location.
Tab WidthThe tab width, which can range from 1 – 32 spaces. (Default is 4 spaces.)
Default to Full Module ViewProcedures for new modules are displayed in the Code window as a single, scrollable list or one procedure at a time.
Procedure SeparatorDisplay separator bars at the end of each procedure in the Code window.
Auto List MembersAt the insertion point, Visual Basic displays information that logically completes a statement.
Auto Quick InfoInformation about functions and their arguments is displayed as you type.
Auto Data TipsAutomatically display the value of any variable on which you place the mouse pointer. Available only in break mode.
Drag-Drop in Text EditingCode elements can be dragged from the Code window into the Immediate or Watch windows.

Editor Format

OptionDescription
Foreground, Background, and IndicatorThe color of different categories of text listed in the Code Colors list.
FontThe font used for displaying code.
SizeThe size of the font used for code.
Margin Indicator BarDisplay the Margin Indicator Bar.

General

OptionDescription
Show GridDisplay a grid on a form.
Grid UnitsLists the unit of measurement for units in the grid.
WidthThe width of the grid cells on a form.
HeightThe height of the grid cells on a form.
Align Controls to GridAutomatically position the outer edge of controls on the closest grid lines.
Show ToolTipsDisplay ToolTips for toolbar buttons.
Collapse Proj. Hides WindowsAutomatically close the project, UserForm, object, or module windows when a project is collapsed in the Project Explorer.
Notify Before State LossDisplay a message that a requested action will cause all module-level variables to be reset for a running project.
Break on All ErrorsAny error causes the project to enter break mode, whether or not an error handler is active, and whether or not the code is in a class module.
Break in Class ModuleAny unhandled error produced in a class module causes the project to enter break mode at the line of code which produced the error.
Break on Unhandled ErrorsAny other unhandled error causes the project to enter break mode.
Compile On DemandA project is fully compiled before it starts, or code is compiled as needed.
Background CompileUse idle time during run time to finish compiling the project in the background. (Available only if Compile On Demand is set.)

Docking

OptionDescription
The check box for the appropriate windowA window can be anchored to an adjacent dockable window or the Visual Basic Editor window.


Community Additions

ADD
Show:
© 2014 Microsoft