Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I have a chart that its expressions are introduced dinamically by a macro, but I don´t know how to set the option show in %. How can I activate this optinon in the macro???
Thanks.
HI
For number presentation in macro:
Sub ChartNumberFormat
set chart = ActiveDocument.GetSheetObject("CH01")
set p = chart.GetProperties
set np = p.Expressions.Item(0).Item(0).Data.ExpressionVisual.NumberPresentation
np.Dec = "."
np.Fmt = "# ##0.00%"
np.nDec = 2
np.Thou = " "
np.Type = 11 'fixed decimal
np.UseThou = 1
chart.SetProperties p
End Sub
But why you can go for macro?
Try like this
Exp:
=num(Sum(Sales),vNum)
In button:
Set variable:
variable: vNum
value: =if(vNum = '#,##0','#,##0%','#,##0')
Hope it helps
HI
For number presentation in macro:
Sub ChartNumberFormat
set chart = ActiveDocument.GetSheetObject("CH01")
set p = chart.GetProperties
set np = p.Expressions.Item(0).Item(0).Data.ExpressionVisual.NumberPresentation
np.Dec = "."
np.Fmt = "# ##0.00%"
np.nDec = 2
np.Thou = " "
np.Type = 11 'fixed decimal
np.UseThou = 1
chart.SetProperties p
End Sub
But why you can go for macro?
Try like this
Exp:
=num(Sum(Sales),vNum)
In button:
Set variable:
variable: vNum
value: =if(vNum = '#,##0','#,##0%','#,##0')
Hope it helps
ThankYou!!! ![]()