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.
<HsvData>.SetCellDescriptions varlScenario, varlYear, varlPeriod, varlEntity, varlParent, varlValue, varlAccount, varlICP, varlCustom1, varlCustom2, varlCustom3, varlCustom4, varbstrCellText
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.
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