ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change Axis Title (https://www.excelbanter.com/excel-programming/403788-change-axis-title.html)

[email protected]

Change Axis Title
 
Hello, I am trying to find a way, to change Axis titles via VBA. But I
can only select those. Can anybody help?

Thanks in advance,
Oliver

JLGWhiz

Change Axis Title
 
This is in VBA help files:

For the X axis:

With Charts("Chart1").Axes(xlCategory)
.HasTitle = True
.AxisTitle.Text = "July Sales"
End With

For the Y axis change xlCategory to xlValue, and of course, the title.


" wrote:

Hello, I am trying to find a way, to change Axis titles via VBA. But I
can only select those. Can anybody help?

Thanks in advance,
Oliver


[email protected]

Change Axis Title
 
On Jan 7, 4:42*pm, JLGWhiz wrote:
This is inVBAhelp files:

For the Xaxis:

With Charts("Chart1").Axes(xlCategory)
* * .HasTitle = True
* * .AxisTitle.Text = "July Sales"
End With

For the YaxischangexlCategory to xlValue, and of course, thetitle.



" wrote:
Hello, I am trying to find a way, tochangeAxistitles viaVBA. But I
can only select those. Can anybody help?


Thanks in advance,
Oliver- Hide quoted text -


- Show quoted text -


Thanks, that worked,
Oliver


All times are GMT +1. The time now is 01:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com