SetJournalProperty

Describes the Oracle Smart View for Office VBA function, SetJournalProperty.

Description

SetJournalProperty() sets the specified properties for the currently open journal.

Syntax

Function SetJournalProperty(

sheetName As String,

props() As String,

propVals() As String

) As Long

Parameters

sheetName: An input argument. Provide the name of the sheet in which a Journal is open.

props: An input argument. Provides the list of properties as an array of strings.

propVals: An input argument. Provide the list of property values as an array of strings.

Return Value

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

Example

Public Declare Function HypRetrieve Lib "HsAddin" (ByVal vtSheetName As Variant) As Long
Sub SetJournalProperty()
    
    Dim props(6) As String
    props(0) = HFM_JOURNALPROP_LABEL
    props(1) = HFM_JOURNALPROP_DESCRIPTION
    props(2) = HFM_JOURNALPROP_TYPE
    props(3) = HFM_JOURNALPROP_BALANCE_TYPE
    props(4) = HFM_JOURNALPROP_GROUP
    props(5) = HFM_JOURNALPROP_SECURITY
    props(6) = HFM_JOURNALPROP_READONLY
    
    Dim propVals(6) As String
    propVals(0) = "J001"
    propVals(1) = "Test1"
    propVals(2) = HFM_JOURNALPROP_TYPE_REGULAR
    propVals(3) = HFM_JOURNALPROP_BALANCETYPE_BALANCED
    propVals(4) = HFM_JOURNALPROP_GROUP_ALLOCATION
    propVals(5) = HFM_JOURNALPROP_SECURITY_ACCOUNTS
    propVals(6) = "0"
    
    Dim retVal As Long
    Set jObj = New JournalVBA
    retVal = jObj.SetJournalProperty("Sheet1", props, propVals)
    
    If retVal = 0 Then
        Debug.Print "SetJournalProperty Succeeded"
        
        Dim status As Long
        status = HypRetrieve(Empty)
        Debug.Print "HypRetrieve returned Status as "; status
    Else
        Debug.Print "SetJournalProperty Failed"
    End If
    
End Sub