HypSetGlobalOption

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

Description

HypSetGlobalOption() sets global Oracle Smart View for Office options. Global options are options that apply to the entire current workbook and to any workbooks and worksheets that are created henceforth.

Note:

You can set only one option at a time.

Tip:

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

Syntax

HypSetGlobalOption(vtItem, vtGlobalOption)

ByVal vtItem As Long

ByVal vtGlobalOption As Variant

Parameters

vtItem: The number that indicates which option is to be set. See Table 13-1 for values.

vtGlobalOption: A variant which can take a Boolean, Number, or Text value denoting the option being set for vtItem. If Null or Empty, no action is performed.

Return Value

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

Notes

For backward compatibility, HypSetGlobalOption(5, 5) is supported for setting the profiling option only on sheets created earlier than Smart View 11.1.2.5.000. This VBA statement is not supported to set the profiling option on sheets created in Smart View 11.1.2.5.000 and later.

In Smart View 11.1.2.5.000 and later, using HypSetGlobalOption(5,5) to set the profiling option returns a value of -69, SS_VBA_DEPRECATED. Instead, use the following functions to get or set the profiling option:

  • HypGetGlobalOption(20) and HypSetGlobalOption(20, True or False)

  • HypGetOption(119, Var, "") and HypSetOption(119, True or False, "")

Example

The following example sets the option to display no messages.

Declare Function HypSetGlobalOption Lib "HsAddin" (ByVal vtItem As Long, ByVal vtGlobalOption As Variant) As Long

Sub Example_HypSetGlobalOption()
   X=HypSetGlobalOption(5, 3)
If X=0 Then
   MsgBox("Message level is set to 3 - No messages")
Else
   MsgBox("Error. Message level not set.")
End If
End Sub