![background image](http://html1.mh-extra.com/html/zeiss/elyra-7/elyra-7_operating-manual_3332235434.webp)
CHAPTER 2 - MACROS AND VISUAL BASIC
ZEISS
VBA Version
ELYRA 7
2
000000-2262-999
03/2019 V_02
1
VBA Version
Both versions of VBA (Visual Basic for Applications) – version 6.4 (32 bit) and version 7.1 (64 bit) – are
available.
Version 6.4 is registered by default to ensure compatibility to existing macros.
By registering version 7.1 the 64 bit processing will be supported. Other DLLs will be registered in this
case. Old macros have to be converted to the new format.
The registered VBA version will be shown in the
Help/About
dialog.
2
Macros
The macro function permits the recording, running and editing of command sequences and their
allocation to buttons in the
Macro
menu. Macros can be set up in two different ways: The Visual Macro
Editor or alternatively they can be programmed in Visual Basic directly.
•
In the
Menu
bar (see Fig. 1), click on
Macro
.
−
This displays the
Macro
menu (see Fig. 2).
•
The Macro list is bipartite:
Macro
– editing and recording of
macros; assign macros to list
•
Visual Macro Edito
r – edit automatic workflows with pre-
defined modules
Selecting
Macro
opens a dialogue for editing and recording Macros based on VBA programming in the
Macro Control
window (see Fig. 3).
Using the
Visual Macro Editor
button (optional) allows to create automated work flows using the
arrangement of symbols which depict the single steps within a work flow.
2.1
Macro Language
"Visual Basic for Applications", called VBA in the following, is used as the Macro language. This language
is well known and widely used as Macro language in the "Microsoft Word for Windows" and "Microsoft
Excel for Windows" products. Experience with "Microsoft Visual Basic" would also be beneficial for
macro-programming ZEN.
An Integrated Development Environment (IDE), the "Microsoft Visual Basic Editor", is available for editing
and debugging of macros. The IDE includes an "online help" with a detailed description of the VBA
language.
Macros are stored in project files. One project file can include several macros.
Fig. 1
Menu bar
Fig. 2
Macro menu