HypSetOption

Data provider types: Essbase, Planning, Oracle Planning and Budgeting Cloud, Financial Management, Hyperion Enterprise

Description

HypSetOption() enables you to set Smart View options as both global (default) and sheet specific so that you do not need separate VBA commands for the two option types.

See also HypSetGlobalOption and HypSetSheetOption.

Syntax

HypSetOption (vtItem,vtOption,vtSheetName)

ByVal vtItem As Variant

ByVal vtOption As Variant

ByVal vtSheetName As Variant

Parameters

vtItem: The index or constant that refers to a specific option. See Table 7, Option Constants for HypGetOption and HypSetOption for descriptions of the options. Also, a list of available options is shown in smartview.bas under “Enumeration of options index to be used for HypGetOption/HypSetOption.

vtOption: The input value to set for an option.

vtSheetName: The sheet name to set a sheet level option. If a valid sheet name is not provided, then the default option is used.

Return Value

Returns 0 if successful; otherwise, returns the appropriate error code.

Example

Public Declare Function HypSetOption Lib "HsAddin" ( ByVal vtItem As Variant,ByVal vtOption As Variant, ByVal vtSheetName As Variant) As Long

Sub Example_HypSetOption()

sts = HypSetOption(HSV_ZOOMIN, 2, "Sheet2") 'set zoom in option for sheet2
sts = HypSetOption(HSV_ZOOMIN, 1, "") 'set default zoom in

sts = HypSetOption(HSV_INVALID_LABEL, "#InvalidTest", "Sheet2")  'set invalid label for sheet2
sts = HypSetOption(17, "#globalinvalid", "") 'set default invalid label, numbers can be used instead of declared constants

End Sub

Sub SetOptn()
   HypSetOption (HSV_REFRESH_SELECTED_DEPENDENT_FUNCTIONS, False, "")
   HypSetOption (HSV_IMPROVE_METADATASTORAGE, False, "")
End Sub