Skip to content

Set up VBA References

How do I get to this dialog box?
  1. Open the Reflection Settings window as follows:

    • If you're using the Ribbon interface, from the Quick Access Toolbar, click .

    • For an IBM session in the Classic interface, choose Settings from the Options menu.

    • For a VT Session in the Classic interface, choose View Settings on the Setup menu.

  2. Under Terminal Configuration, select Set Up VBA References.

You can centrally manage VBA macros by saving them in session document files that reside on a network share or other location and then configuring local session documents to reference these shared documents. The shared documents can reside on any location, as long as it is a trusted location.

When a local session document file with a reference to a shared session document file opens, it downloads the latest versions of the macros in the shared session document.

Reflection Desktop supports shared VBA macros for IBM ( .rd5x and .rd3x) and VT ( .rdox) session documents. You'll need to create at least one session document file for each type of terminal you are using. Session document files can only reference macros in the same type of session document. For example, IBM3270 sessions can only reference session documents with an .rd3xextension.

note

When Reflection is unable to open a referenced session document, an error symbol is displayed next to that document. Your session cannot run macros in this file until you correct the problem.

To set up a reference to a session document file

  1. In the Specify Trusted Locations dialog box, make sure the location you are saving the shared session documents on is on the list of trusted locations and add it if necessary. You must use a UNC path to specify this location. If you are using a network share, you'll also need to select Allow trusted location on my network. (See Specify Trusted Locations Dialog Box.)

  2. Add the shared session file document names to the Referenced Session Documents list.

    note

    If you are saving the shared session documents on a network share, you'll need to specify the location with a UNC path. Mapped letter drives are not supported.

  3. Deploy the local session document as well as any trusted location settings you configured to users.

    note

    For more about setting up and deploying shared macros, see Set up Shared VBA Macros in the Reflection Deployment Guide.

To handle problems with references

  1. If the button is displayed next to a referenced session document, mouse over the button for information about the problem.

  2. After you correct the problem (typically a missing file or a disconnected network drive), close and reopen your session.

    note

    Another way to share VBA macros is to save them in the SharedMacros.rd3x, SharedMacros.rd5x, or SharedMacros.rdox files and then deploy them to the user data folder. When a session opens, it automatically loads the macros from the SharedMacros file that corresponds to its file type. (See Centrally Manage VBA Macros in the Reflection Deployment Guide.)