Using Essbase VBA Functions

This procedure provides an example of how to use Essbase VBA functions in the spreadsheet using EssVConnect.

  To use Essbase VBA functions in a spreadsheet:

  1. Select View, then Toolbars, and then Forms.

  2. Select Tools, then Macro, and then Visual Basic Editor.

  3. In the Visual Basic Editor, select Insert, and then Module.

  4. Copy and paste the content of ESSBASE/BIN/ESSXLVBA.TXT into the module to declare all functions.

    Alternatively, you can declare only the individual function that you plan to use.

  5. Select Insert, and then Module.

  6. In the module, using an example from EssVConnect, enter the this VBA code for the EssVConnect function:

    Sub Conn()X=EssVConnect(Empty, "User1", "password", "Local", "Sample", "Basic")End Sub

    Substitute your user name, password, server name, database, and application.

  7. From the Excel Forms toolbar, select Button icon. to create a button.

  8. In Assign Macro, select the name of the subroutine from the list of functions.

    In this example, select Conn.

  9. Click OK.

    The function is now associated with the button that you just created.

  10. Rename the button, if desired.

  11. To run this function:

    1. Select Tools, then Macro, and then Macros.

    2. Select the function name, and then click Run.

    Alternatively, you can click the button that you just created.