I need to add the Label to the category axis. How could I do it?

C

Chen Yan

I am sorry to post this question, cause I am very good in
VB programming.

I need to draw a chart (the data is in the excel files),
and This is my code. The chart type I want is
xl3DColumnClustered, and Z6:z13 contains the data I want
to plot, and Y6:Y13 contains the label I want to put into
the x-axis as lable.


With ActiveWorkbook.Charts(Charts.Count)
.ChartArea.Border.ColorIndex = 5
.ChartWizard Source:=ActiveWorkbook.Worksheets
(SheetName).Range("Z6:Z13"), Gallery:=xl3DColumn
.ChartType = xl3DColumnClustered
.Axes(xlValue).TickLabels.NumberFormat = "0.00"
.HasLegend = False
.Axes(xlCategory).HasTitle = True
.Axes(xlCategory).AxisTitle.Caption = "Package
Size"
.Axes(xlValue).HasTitle = True
.Axes(xlValue).AxisTitle.Caption = "Through Put"
.HasTitle = True
.ChartTitle.Text = ChartTitleAll
End With

Really appreciate your help!

Henry
 
H

Herfried K. Wagner [MVP]

* "Chen Yan said:
I am sorry to post this question, cause I am very good in
VB programming.

I need to draw a chart (the data is in the excel files),
and This is my code. The chart type I want is
xl3DColumnClustered, and Z6:z13 contains the data I want
to plot, and Y6:Y13 contains the label I want to put into
the x-axis as lable.


With ActiveWorkbook.Charts(Charts.Count)
.ChartArea.Border.ColorIndex = 5
.ChartWizard Source:=ActiveWorkbook.Worksheets
(SheetName).Range("Z6:Z13"), Gallery:=xl3DColumn
.ChartType = xl3DColumnClustered
.Axes(xlValue).TickLabels.NumberFormat = "0.00"
.HasLegend = False
.Axes(xlCategory).HasTitle = True
.Axes(xlCategory).AxisTitle.Caption = "Package
Size"
.Axes(xlValue).HasTitle = True
.Axes(xlValue).AxisTitle.Caption = "Through Put"
.HasTitle = True
.ChartTitle.Text = ChartTitleAll
End With

You should post this question to the Excel programming group: microsoft.public.excel.programming.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top