Walshie1987
Technical User
- Oct 5, 2006
- 100
Hi I have a bar chart (MyGraph) and a button (MyButton) when I click "MyButton" I want "MyGraph" to change to a pie chart automatically, so i have entered the following code:
Sub MyButton_Click()
Dim GraphObj As Object
Set GraphObj = Me![MyGraph].Object.Application.Chart
GraphObj.Type = xL3DPie
End Sub
but get:
"Run-Time error '1004'
unable to set the type property of the chart class
any ideas?
Sub MyButton_Click()
Dim GraphObj As Object
Set GraphObj = Me![MyGraph].Object.Application.Chart
GraphObj.Type = xL3DPie
End Sub
but get:
"Run-Time error '1004'
unable to set the type property of the chart class
any ideas?