Name
ticklabels
.Font
Synopsis
Returns a Font
object you can use to format tick label text. For example, the following code makes the category axis tick labels italic:
Sub FormatTickLabels( ) Dim chrt As Chart, ax As Axis, tl As TickLabels ' Get the chart. Set chrt = ActiveChart ' Get the category axis. Set ax = chrt.Axes(xlCategory, xlPrimary) ' Get the tick labels. Set tl = ax.TickLabels ' Format them. tl.Font.Italic = True End Sub
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.