Returns the data in a cell, as well as the cell’s status.
GetCell returns cell data as a Double data type. To return a cell’s data as a formatted string, use GetTextCell. |
<HsvData>.GetCell(lScenario, lYear, lPeriod, lView, lEntity, lParent, lValue, lAccount, lICP, lCustom1, lCustom2, lCustom3, lCustom4, pdData, plStatus)
Long (ByVal). The member ID of the cell's Scenario dimension member. | |
Long (ByVal). The member ID of the cell's Year dimension member. | |
Long (ByVal). The member ID of the cell's Period dimension member. | |
Long (ByVal). The member ID of the cell's View dimension member. | |
Long (ByVal). The member ID of the cell's Entity dimension member. | |
Long (ByVal). The member ID of the parent of the lEntity argument's entity. | |
Long (ByVal). The member ID of the cell's Value dimension member. | |
Long (ByVal). The member ID of the cell's Account dimension member. | |
Long (ByVal). The member ID of the cell's Intercompany Partner dimension member. | |
Long (ByVal). The member ID of the cell's Custom 1 dimension member. | |
Long (ByVal). The member ID of the cell's Custom 2 dimension member. | |
Long (ByVal). The member ID of the cell's Custom 3 dimension member. | |
Long (ByVal). The member ID of the cell's Custom 4 dimension member. | |
Long. Returns the cell’s status. For details on cell statuses, see About Cell Statuses. |
Integer. Indicates the success of the function call; returns 0 for success or an error code for failure.
The following subroutine populates two Label controls with a cell’s data and status. The subroutine takes the member IDs of the cell’s dimension members. The cell status string is obtained by passing the status Long returned by GetCell to FormatStatusToText.
Sub fillCellLabels(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) Dim cData As HsvData, dData As Double, lStatus As Long Dim sStatus As String 'g_cSession is an HsvSession object reference Set cData = g_cSession.Data cData.GetCell lScen, lYear, lPer, lView, lEnt, _ lPar, lVal, lAcct, lICP, lCust1, lCust2, _ lCust3, lCust4, dData, lStatus sStatus = cData.FormatStatusToText(lStatus) 'Populate the labels lblData.Caption = dData lblStatus.Caption = sStatus End Sub