IanGalletly
Programmer
I am trying to change the display of a chart on a form in Access 2000.
I have some code that changes the charttype between xlAreaStacked and xl3DBarStacked which works fine.
However, to try and tied up the display I would also like to change the text alignment. If the form starts with glbOverviewRows = "Months", the code works correctly, however if the data dictates the form starts as xl3DBarStacked then I am getting an error of "1004: Unable to get the TickLabels property of the Axis class" on the high-lighted line.
With OverviewChart
If glbOverviewRows = "Months" Then
.ChartType = xlAreaStacked
With .Axes(xlCategory, xlPrimary).TickLabels
.Orientation = xlUpward
End With
Else
.ChartType = xl3DBarStacked
With .Axes(xlCategory, xlPrimary).TickLabels
.Orientation = xlHorizontal
End With
End If
End With
I seem to need to 'requery' the chart object after the first charttype change to expose the axes collection fully.
Any suggestions please
I have some code that changes the charttype between xlAreaStacked and xl3DBarStacked which works fine.
However, to try and tied up the display I would also like to change the text alignment. If the form starts with glbOverviewRows = "Months", the code works correctly, however if the data dictates the form starts as xl3DBarStacked then I am getting an error of "1004: Unable to get the TickLabels property of the Axis class" on the high-lighted line.
With OverviewChart
If glbOverviewRows = "Months" Then
.ChartType = xlAreaStacked
With .Axes(xlCategory, xlPrimary).TickLabels
.Orientation = xlUpward
End With
Else
.ChartType = xl3DBarStacked
With .Axes(xlCategory, xlPrimary).TickLabels
.Orientation = xlHorizontal
End With
End If
End With
I seem to need to 'requery' the chart object after the first charttype change to expose the axes collection fully.
Any suggestions please