The VBE code window elements
This module provides a brief description of items used in a VBA code module. The points described below are elements from figure 1.
Code writing
- VBA Key word - Foreground: Color 5 [Blue], example:
Option Explicit, Sub, Call,...
- Comment text (item 3) - Color 10, example:
' [Break] at Stop
Blinking insertion point
- Blinking insertion point (BIP) (item 2) - over-write mode ▮, and insert mode |. Press Insert on the keyboard to switch between modes
The position of the BIP is shown by the line and column indicators on the VBE Standard Toolbar. Currently positioned at Line 5 Column 8 [Ln 5, Col 8] in figure 1. Note the use of row, column coordinates
Position the BIP in a Sub procedure to execute code with F5 or Run Sub
Move the BIP with the keyboard Arrow keys or Click a location with the Mouse.
Margin indicator bar
Items D to F have indicators in the Margin Indicator Bar / gutter. If the Margin Indicator Bar is not visible, change the settings on the Tools > Options ... > Editor Format > Margin Indicator Bar)
- Call return (item 1,) ► - [for advanced use only] Margin Indicator: Color 4 - activate from the View > Call Stack... in [Break] mode
- Execution point (item 4) - Margin Indicator: arrow Color 6 [Yellow], Background: Color 6 [Yellow], example
Stop
. The execution point is the next code statement to be executed. Click F5 (Run) of F8 (Step) to continue
Click Reset on the Standard Toolbar to clear the Execution point marker - Break point (item 5) - ● Margin Indicator: Color 9, example:
End Sub
- Development platform: Excel 2016 (64 bit) Office 365 ProPlus on Windows 10
- Revised: Saturday 25th of February 2023 - 10:12 AM, [Australian Eastern Time (AET)]