Data source types: Essbase
HypGetSubstitutionVariable() retrieves substitution variables and their current value from Essbase.
HypGetSubstitutionVariable (vtSheetName, vtApplicationName, vtDatabaseName, vtVariableNameList, vtVariableValueList)
ByVal vtSheetName As Variant
ByVal vtApplicationName As Variant
ByVal vtDatabaseName As Variant
ByVal vtVariableName As Variant
ByRef vtVariableNameList As Variant
ByRef vtVariableValueList As Variant
vtSheetName: For future use. Currently the active sheet is used.
vtApplicationName: The application name to return variables scoped for the specified application. If vtApplicationName is Null or Empty all the applications are considered.
vtDatabaseName: The database name to return variables scoped for the specified database. If vtDatabaseName is Null or Empty all the databases are considered.
vtVariableName: The variable name to be retrieved. If vtVariableName is Null or Empty the entire list of variables is returned.
vtVariableNameList: Output Result Vector that contains the list of the variable names. Its contents are unknown if the macro fails.
vtVariableValueList: Output Result Vector that contains the list of the variable values corresponding to each variable returned. Its contents are unknown if the macro fails.
Declare Function HypGetSubstitutionVariable Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtApplicationName As Variant, ByVal vtDatabaseName As Variant, ByVal vtVariableName As Variant, ByRef vtVariableNames As Variant, ByRef vtVariableValues As Variant) As Long Sub Sample_HypGetSubstitutionVariable Dim vtVarNameList as Variant Dim vtVarValueList as Variant Dim vtVarVal as Variant Dim vtVar as Variant X = HypGetSubstitutionVariable (Empty, "Sample", "Basic", Empty, vtVarNameList, vtVarValueList) If IsArray (vtVarNameList) Then For i = LBound (vtVarNameList) To UBound (vtVarNameList) vtVar = vtVarNameList (i) Next End If If IsArray (vtVarValueList) Then For i = LBound (vtVarValueList) To UBound (vtVarValueList) vtVarVal = vtVarValueList (i) Next End If End Sub