Name
axis.DisplayUnit [= xlDisplayUnit]
Synopsis
For value axes, sets or returns the numeric scale used by the axis. Default is xlNone. Can be one of these settings:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Setting this property adds a DisplayUnitLabel to the axis. For example, the following code sets the scale of the value axis and changes the display unit caption:
Sub SetAxisScale( )
Dim chrt As Chart, ax As Axis
Set chrt = ActiveSheet
Set ax = chrt.Axes(xlValue, xlPrimary)
ax.DisplayUnit = xlThousands
ax.DisplayUnitLabel.Caption = "(in $K)"
End SubBecome an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access