OS. Instantiate OpenSTAAD in VBA

In the this set of steps, you will instantiate OpenSTAAD and have the spreadsheet macro retrieve information from the open STAAD.Pro model.

This is required in order to access OpenSTAAD API from within your code. It’s a two part process in VBA: You first declare something as the object and then direct the that object at OpenSTAAD.
  1. Within your subroutine, type Dim objOpenSTAAD As Object.

    Notice how as you begin typing the word Object, a small list opens with relevant terms. This is called IntelliSense and it can help you quickly and accurately complete code lines.

  2. Press Return.
  3. Type Set objOpenSTAAD = GetObject(,”StaadPro.OpenSTAAD”)
    This assigns the OpenSTAAD application object to the variable you defined in Step 1.
  4. Press Return.