Macro (SVB) Programs Window Overview

The Macro (SVB) Programs window comprises several basic components:

Object. The Object combo box contains a single option, (General). This simply refers to the current macro that you are editing.

Proc(edure). The Proc combo box will contain at least two options, (declarations) and Main. As you add functions to the macro, they will be added to this combo box. When you select a function from this combo box, the cursor will be sent directly to the function that you had chosen.

If the Proc combo box is set to (declarations), then you are able to enter global variables, external library inclusions, and API declarations.

If the Proc combo box is set to Main, then the cursor will be sent to the Main function within your macro. This is where the macro begins and ends, so it is mandatory that every macro you create must at least contain this particular function.

Visual Basic editor. The macro's code is entered and debugged within this enhanced edit field. The STATISTICA Visual Basic editor is a complete Visual Basic editor which incorporates the following advanced features:

IntelliSense® technology. IntelliSense® can display and auto-complete all possible elements or values of objects (including their respective properties and functions).

Syntax Highlighting. Visual Basic keywords will be highlighted blue and comments will be highlighted green; invalid syntax will be highlighted red.

Function Page Breaking. All functions and sub procedures will automatically have page breaks inserted between each other.

Debug Window. When the macro is running in debug mode (i.e. breakpoints have been set), a debug pane will be displayed at the top of the macro document. The Debug Window consists of the following components:

Immediate. This window is used as a STATISTICA Visual Basic interpreter while the macro itself is running. Simply type or paste Visual Basic code into it and press Enter and it will execute; if there is a syntax error then the error message will be displayed in the macro's status bar. An important use for this is to change variable values within a macro without having to reset and edit it.

Watch. Type the variables that you wish to watch into the Watch tab's edit box and it will display the variable's current value while the macro is running (depending on where the current breakpoint is set).

Stack. The first line of the Stack tab will display the currently running library, function name, line number, and text of the current breakpoint. If the current breakpoint is within a function outside of the Main sub procedure, then a second line will be displayed. This line will display the library, function name (Main), line number, and text of the location that called the current function.

Loaded. Displays the currently loaded libraries that the macro is utilizing.

See also STATISTICA Visual Basic overview.