Extracting Attribute for a Base Member using VBA
I'm using the below code to fetch the associated attribute member for a specific base member and write it to a specific cell. Below is the code for the same:
Sub HypOtlGetMemberInfo()
Dim X, Y As Long
Dim skuMember As String
Dim vAttrValue As Variant
skuMember = Range("C5").Value
X = HypGetMemberInformation("BS", skuMember, HYP_MI_ATTRIBUTE_MEMBERS, vtValues, vAttrValue)
If X <> 0 Then
Application.ScreenUpdating = True
SVError = SmartViewEC(X)
Exit Sub
End If
Range("C12").Value = vAttrValue
End Sub
I above code is working perfectly for only one associated attribute Dimension. However, things are not that simple always. In my case, I have 4 attribute dimensions associated to a standard dimension and I need to fetch all the four attribute members associated to a specific base member.