Editing Legacy Reflection Macros <User Guide>

You can edit legacy Reflection macros in the Visual Basic Editor. However, some Session methods and properties are no longer supported. For more information, see the Reflection VBA Guide (Help > VBA Guide).

To edit a legacy Reflection macro

  1. Open the settings file that contains the legacy macro.

    -or-

    If you've previously saved a settings file that contains one or more legacy macros to a Reflection session document, open the session document.

  2. In the Project pane, locate the project named ProjectLegacy(filename), open the appropriate module, and then edit the macro.

    NOTE:Edits to legacy macros must be done in the legacy project (ProjectLegacy).

  3. Save the file as a Reflection session document to retain your changes.

    Reflection identifies the macro as a "legacy macro," even though it's in a Reflection session document.

Editing Reflection Basic Macros

To edit Reflection Basic scripts

  1. Open the Reflection Basic Editor.

  2. Open the Reflection Basic script that you want to edit.

  3. Use Application for the Reflection object name.

    Code sample
  4. (Optional) To access information or procedures in other Reflection Basic scripts, use the $Include metacommand, the Declare statement, or the RunScript method.

    Code sample

To edit a Reflection Basic macro (script):

  1. Open the Reflection Basic Editor.

  2. Open the Reflection Basic script that you want to edit.

  3. Optional: To access information or procedures in other Reflection Basic scripts, use the $Include metacommand, the RunScript method, or the Declare statement.

    Example of the $Include metacommand:

    This line of code, (the comment is intended) will make functions in the common.rbs available to the .rbs file.

    '$include ".\common.rbs"

    Example of the RunScript method:

    This line of code runs the myTestRBScript.rbs script.

    Application.RunScript "myTestRBScript.rbs", ""

Related Topics