SetTextCell

Inserts data into a cell, passing the data as a String. SetTextCell also enables you to scale the data that is passed.

Tip:

To insert data into a cell by passing a Double, use SetCell instead of SetTextCell. For more information, see SetCell.

Syntax

<HsvData>.SetTextCell(lScenario, lYear, lPeriod, lView, lEntity, lParent, lValue, lAccount, lICP, lCustom1, lCustom2, lCustom3, lCustom4, sScale, bstrData)

Argument

Description

lScenario

Long (ByVal). The member ID of the cell's Scenario dimension member.

lYear

Long (ByVal). The member ID of the cell's Year dimension member.

lPeriod

Long (ByVal). The member ID of the cell's Period dimension member.

lView

Long (ByVal). The member ID of the cell's View dimension member.

lEntity

Long (ByVal). The member ID of the cell's Entity dimension member.

lParent

Long (ByVal). The member ID of the parent of the lEntity argument's entity.

lValue

Long (ByVal). The member ID of the cell's Value dimension member.

lAccount

Long (ByVal). The member ID of the cell's Account dimension member.

lICP

Long (ByVal). The member ID of the cell's Intercompany Partner dimension member.

lCustom1

Long (ByVal). The member ID of the cell's Custom 1 dimension member.

lCustom2

Long (ByVal). The member ID of the cell's Custom 2 dimension member.

lCustom3

Long (ByVal). The member ID of the cell's Custom 3 dimension member.

lCustom4

Long (ByVal). The member ID of the cell's Custom 4 dimension member.

sScale

Integer (ByVal). Indicates the degree of scaling to apply to the bstrData argument’s amount. To leave this amount unscaled, pass 0. To scale the amount, each whole-number increment over 0 scales by ten. In other words, passing 1 scales by ten, passing 2 scales by a hundred, and so on.

To apply the application’s default scaling, pass the HFMConstants type library constant DEFAULT_SCALE, described in Number Defaults Constants.

bstrData

String (ByVal). The data to be inserted in the cell.

Return Value

Integer. Indicates the success of the function call; returns 0 for success or an error code for failure.

Example

The following subroutine inserts data into a cell, scaling the data by ten. The cell’s dimension members and data are specified by the subroutine’s arguments.

Sub setCellDataScaledbyTen(lScen As Long, lYear As Long, lPer _
    As Long, lView As Long, lEnt As Long, lPar As Long, lVal As _
    Long, lAcct As Long, lICP As Long, lCust1 As Long, _
    lCust2 As Long, lCust3 As Long, lCust4 As Long, _
    sData As String)
Dim cData As HsvData
'g_cSession is an HsvSession object reference
Set cData = g_cSession.Data
cData.SetTextCell lScen, lYear, lPer, lView, lEnt, lPar, _
    lVal, lAcct, lICP, lCust1, lCust2, lCust3, lCust4, _
    1, sData
End Sub