I hope someone can help.
I am trying to use VBA to set the colors for the slices in a pie chart. My
problem is with accessing the object itself.
I am using the following code in a command button on a seperate form (Form1):
Dim myChart As Graph.Chart
Set myChart = Reports!Report2.Graph0.Object.Application.Chart
myChart.HasTitle = True
myChart.ChartTitle = "Aaron"
I am getting the error on click "Invalid Outside Procedure" and the problem
seems to be the Set statement. Any ideas what I am doing wrong?
Thanks,
Aaron
JHB - 29 Jun 2007 21:00 GMT
Hello.
You are missing the Caption.
So it must be
myChart.ChartTitle.Caption = "Aaron"
Regards
Jørn
> I hope someone can help.
>
[quoted text clipped - 19 lines]
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/200706/1