Use the Smart View VB toolkit and "retrieve" the generation or level of a particular member or members with an Excel Function!
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Generation Formula:
Attribute GetGeneration.VB_Description = ":: This function ""=GetGeneration(cell)"" allows you to reference a cell which IS A VALID MEMBER of the outline and returns the GENERATION NUMBER of that member ::"""
Dim strDimG As String
strDimG = CStr(strDimension.Value)
If strDimension <> "" Then
X = HypFindMember(Empty, strDimG, "Default", dimName, aliasName, GenName, levelName)
End Function
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Level Formula:
Public Function GetLevel(strDimension As Range) As String
Attribute GetLevel.VB_Description = ":: This function ""=GetLevel(cell)"" allows you to reference a cell which IS A VALID MEMBER of the outline and returns the LEVEL NUMBER of that member ::"""
Dim strDimG As String
strDimG = CStr(strDimension.Value)
If strDimension <> "" Then
X = HypFindMember(Empty, strDimG, "Default", dimName, aliasName, GenName, levelName)
End Function
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
No comments:
Post a Comment