Data provider types: Essbase
HypRetrieveNameRange refreshes the grid created by HypRetrieveRange. This function works only with Smart View multiple-grid defined range names.
HypRetrieveNameRange (vtSheetName, vtGridName)
ByVal vtSheetName As Variant
ByVal vtGridName As Variant
vtSheetName: The name of worksheet on which to run the function. If vtSheetName is Null or Empty, the active worksheet is used.
vtGridName: Input parameter; the name of the named range or grid to be refreshed. Named ranges take the form: "'<Sheetname>'!<range name>"
Returns 0 if successful; otherwise, returns the appropriate error code.
Public Declare Function HypRetrieveNameRange Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtGridName As Variant) As Long Sub RetrieveAllRange() 'connect all required connections sts = HypConnect("Sheet1", "UserName", "Password", "stm10026_Sample_Basic") 'get list of named grids available sts = HypGetNameRangeList("Sheet1", "", vtList) 'refresh each range one by one For i = 0 To 2 sts = HypRetrieveNameRange("Sheet1", vtList(i)) Next i End Sub
If you know the name of the grid:
Public Declare Function HypRetrieveNameRange Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtGridName As Variant) As Long Sub Example_HypRetrieveNameRange() sts = HypRetrieveNameRange("Sheet1", "'Sheet1'!DMDemo_Basic_2") End Sub