New Macros File Dialog Box

 

The New Macros File dialog box is used to create a new VBA macros file.  It is opened from the VBA Macros Files property page in the Options dialog box (New command button).

 

Once the new macros file has been specified in the dialog box, it will be added to the VBA system in RC-WinTrans where it can be used to implement user-defined procedures, functions, and/or event handler classes.

 

One of the following three templates can be used to create a new macros file:

1.

"Initial (Empty) Macros File"

2.

"With Module-Initializing Procedures"

3.

"With Module-Initializing Procedures and Event Handler Class"

 

Details follow below.

 

 

Figure: The New Macros File dialog box.

 

 

Dialog Box Elements

File name

The name and location (path) of the macros file.  Use the Browse button to specify the location and the name of the file in an Open File dialog.

VBA project name

The name of the VBA project.  This name is used in the Project Explorer window of the VBA development environment.

Macros file template

The template to be used for the new macros file.

 

 

Macros Files Templates

There are five template files available for creating a new macros file (VBA projects):

Template 1: "Initial (Empty) Macros File"

An empty macros file.

 

Template 2: "With Module-Initializing Procedures"

A macros file with a module that has a function and a procedure:

OnInitModule

A function which is called when the macros file is ready to use within RC-WinTrans' built-in VBA system.  The function is called after RC-WinTrans is started and after the VBA system has been initialized and is running.

OnTerminateModule

A procedure which is called when RC-WinTrans is about to be closed.

 

Template 3: "With Module-Initializing Procedures and Event Handler Class"

A macros file with module initialization procedures (Template 2) and an implemented event handler class to catch events from RC-WinTrans.  A number of event handler procedures are implemented but deactivated (procedures set as comment).  Examples of this include a procedure of the event handler class that catches the "OnPressFunctionKey" event from RC-WinTrans when a function key (F1 – F12) has been pressed.  Another procedure catches the "OnSelectTransUnit" event that is thrown when a translation unit is selected in RC-WinTrans' Text Table view.

 

Template 4: "File Converter"

VBA project with "File Converter" interface functions.

 

Template 5: "Resource Type Editor Add-On"

VBA project with "Resource Type Editor" interface functions.