SetCellDescriptions

Inserts cell text into one or more cells.

SetCellDescriptions takes arrays of dimension member IDs as arguments, as well as an array of strings containing the cell text to be inserted. These arrays must contain identical numbers of elements. The elements of the member ID arrays have a one-to-one correspondence to the elements of the cell text array; the first elements of the member ID arrays define the first cell in which cell text is to be inserted, the second elements of the member ID arrays define the second cell, and so on.

Syntax

<HsvData>.SetCellDescriptions varlScenario, varlYear, varlPeriod, varlEntity, varlParent, varlValue, varlAccount, varlICP, varlCustom1, varlCustom2, varlCustom3, varlCustom4, varbstrCellText

Argument

Description

varlScenario

Long array (ByVal). The member IDs of the cells' Scenario dimension members.

varlYear

Long array (ByVal). The member IDs of the cells' Year dimension members.

varlPeriod

Long array (ByVal). The member IDs of the cells' Period dimension members.

varlEntity

Long array (ByVal). The member IDs of the cells' Entity dimension members.

varlParent

Long array (ByVal). The member IDs of the parents of the varalEntity argument's entities.

varlValue

Long array (ByVal). The member IDs of the cells' Value dimension members.

varlAccount

Long array (ByVal). The member IDs of the cells' Account dimension members.

varlICP

Long array (ByVal). The member IDs of the cells' Intercompany Partner dimension members.

varlCustom1

Long array (ByVal). The member IDs of the cells' Custom 1 dimension members.

varlCustom2

Long array (ByVal). The member IDs of the cells' Custom 2 dimension members.

varlCustom3

Long array (ByVal). The member IDs of the cells' Custom 3 dimension members.

varlCustom4

Long array (ByVal). The member IDs of the cells' Custom 4 dimension members.

varbstrCellText

String array (ByVal). The cell text to be inserted for the cells. The elements in this array correspond to the elements in the other arguments. For example, the fifth element in this array is the cell text for the cell defined by the member IDs in the fifth elements of the other arguments’ arrays.

Example

The following example puts cell text into cells for the Sales and OtherCosts accounts. The example gets the member IDs for these accounts with calls to the user-defined GetMemberID function; for details on GetMemberID, see the example for GetItemID. The example then assigns these IDs to the laAcct1 variable, which is the array passed to SetCellDescriptions’ varlAccount argument. The cell text is then added to the saCellText variable, and SetCellDescriptions inserts this array’s elements into the cells.

Note:

The example assumes that the member ID arguments for the non-Account dimensions are set in another procedure.

Dim lAcct1 As Long, lAcct2 As Long
Dim laAcct(1) as Long, saCellText(1) As String
lAcct1 = GetMemberID(DIMENSIONACCOUNT, "Sales")
lAcct2 = GetMemberID(DIMENSIONACCOUNT, "OtherCosts")
laAcct(0) = lAcct1
laAcct(1) = lAcct2
saCellText(0) = "Acme sale"   'For the Sales account
saCellText(1) = "Wining/dining"   'For the OtherCosts account
m_cHsvData.SetCellDescriptions laScen, laYear, laPer, laEnt, _ 
laPar, laVal, laAcct, laICP, laCust1, laCust2, laCust3, _ 
laCust4, saCellText