ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Coding "Category (X) Axis"... (https://www.excelbanter.com/charts-charting-excel/139340-coding-category-x-axis.html)

Bob Barnes

Coding "Category (X) Axis"...
 
I'm running Access-to-Excel automation, and using Auto_Open in Excel to see
things like..
ActiveChart.ChartTitle.Text = " The Week" & TheWk

Works fine. I want to "fill a label on the Chart" with a concatenation.

Can I...
ActiveChart."xxx???".Text = "ABC " & TheDay..as an Example.

What would be the ""xxx???" for a "label" such as the "Category (x) Axis"

TIA - Bob

Andy Pope

Coding "Category (X) Axis"...
 
Hi,

Macro recorder gave the majority of the code.

With ActiveChart
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = _
Format$(Now(), "dddd") & "'s X axis label"
End With

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Bob Barnes" wrote in message
...
I'm running Access-to-Excel automation, and using Auto_Open in Excel to
see
things like..
ActiveChart.ChartTitle.Text = " The Week" & TheWk

Works fine. I want to "fill a label on the Chart" with a concatenation.

Can I...
ActiveChart."xxx???".Text = "ABC " & TheDay..as an Example.

What would be the ""xxx???" for a "label" such as the "Category (x) Axis"

TIA - Bob



Bob Barnes

Coding "Category (X) Axis"...
 
Beautiful.

Thank you Andy,
Bob

"Andy Pope" wrote:

Hi,

Macro recorder gave the majority of the code.

With ActiveChart
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = _
Format$(Now(), "dddd") & "'s X axis label"
End With

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Bob Barnes" wrote in message
...
I'm running Access-to-Excel automation, and using Auto_Open in Excel to
see
things like..
ActiveChart.ChartTitle.Text = " The Week" & TheWk

Works fine. I want to "fill a label on the Chart" with a concatenation.

Can I...
ActiveChart."xxx???".Text = "ABC " & TheDay..as an Example.

What would be the ""xxx???" for a "label" such as the "Category (x) Axis"

TIA - Bob




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

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