The PivotTable control(ActiveX) does not use the
Formatted_Value cell property.
With e.g. MyPT.ActiveView.UseProviderFormatting=true,
this will result in measures being displayed as left
justified text.
With method:
set cs = createobject("ADOMD.Cellset")
set cs.ActiveConnection = pt.Connection
cs.Open _
"select " & _
"AddCalculatedMembers(Measures.members) " & _
"on columns " & _
"from " & CubeName & " " & _
"cell properties format_string "
for i = 0 to cs.axes(0).Positions.Count - 1
totalName = cs.axes(0).Positions(i).Members
(0).UniqueName
MyPT.ActiveView.Totals(totalName).NumberFormat = _
cs(i).Properties("FORMAT_STRING")
next
only "Normal Measures" are formatted, Calculated members
are not formatted.
Question1: What's the correct Syntax for formatting
Calculated members?
Question2: With set cs = createobject("ADOMD.Cellset") an
ActiveX control is created.
What's the way to avoid the security warning for the
ActiveX control?
Many Thanks to all.