Data source types: Essbase
HypSetSubstitutionVariable() creates substitution variables in Essbase. If the variable already exists, then its value is set to the new specified value.
HypSetSubstitutionVariable (vtSheetName, vtApplicationName, vtDatabaseName, vtVariableName, vtVariableValue)
ByVal vtSheetName As Variant
ByVal vtApplicationName As Variant
ByVal vtDatabaseName As Variant
ByVal vtVariableName As Variant
ByVal vtVariableValue As Variant
vtSheetName: For future use. Currently the active sheet is used.
vtApplicationName: The application name to define the scope for the new variable. If vtApplicationName is Null or Empty , the scope of the variable created is global.
vtDatabaseName: The database name to define the scope for the new variable. If vtDatabaseName is Null or Empty, the scope of the variable created is global within the application specified.
vtVariableName: The variable name to be created. Required.
vtVariableValue: The value to be assigned to the variable. Required.
Declare Function HypSetSubstitutionVariable Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtApplicationName As Variant, ByVal vtDatabaseName As Variant, ByVal vtVariableName As Variant, ByVal vtVariableValue As Variant) As Long Sub Sample_HypSetSubstitutionVariable Dim X as Long X = HypSetSubstitutionVariable (Empty, "Sample", "Basic", "Account", "100") End Sub