Associating VBA code with multiple displays

If you create VBA code for an object on one display that is to affect an object on another display, the second display must have a VBA project associated with it and the object must be exposed to VBA or an error will be raised.
Example: To associate VBA code with multiple displays
For example, if a button on Display 1 has VBA code for it that allows it, when clicked, to change the caption for a button in Display 2, the following must be done to ensure that it works as planned:
  1. Open Display 2 in the Graphics Display editor and select the button object.
  2. Set its ExposeToVBA property in the Property Panel to VBA Control.
  3. Select VBA Code from the context menu to open the VBA editor.
    This creates a VBA project for Display 2 which enables the button on Display 1 to change the caption on Display 2.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal