To work around this problem and obtain the actual depth level, use the
LevelDepth property of the first member of the
Level object. To do so, use the following code:
Dim oLevel As ADOMD.Level
Dim oMember As ADOMD.Member
Dim oCellset As ADOMD.Cellset
Dim lMembLvDepth As Long
Dim lLevelDepth As Long
Dim oCube As ADOMD.CubeDef
Set oCatalog = New ADOMD.Catalog
oCatalog.ActiveConnection = "Provider=MSOLAP;Data Source=localhost;Initial Catalog=Foodmart 2000"
Set oCube = oCatalog.CubeDefs("Warehouse")
Set oLevel = oCube.GetSchemaObject(adObjectTypeLevel, "[Store].[Store Name]")
Debug.Print oLevel.Members(0).LevelDepth 'This is the suggested workaround