Z
zhuzhuniu
I have simple VBA code to change Y-AXIS scale of the chart in areport and it
worked in Access 2003. But when I run it in access 2007, I keep getting error
Run-time error '2771' The bound or unbound object frame you tried to edit
doesn't contain an OLE object. Below is my code, could anyone help? Many
thanks!
Private Sub Report_Activate()
Dim objChart As Graph.Chart
Dim objAxis As Graph.Axis
Set objChart = Me!Graph0.Object
Set objAxis = objChart.axes(2)
If objAxis.Type = 2 Then
objAxis.maximumscale = 90
objAxis.minimumscale = 60
End If
End Sub
worked in Access 2003. But when I run it in access 2007, I keep getting error
Run-time error '2771' The bound or unbound object frame you tried to edit
doesn't contain an OLE object. Below is my code, could anyone help? Many
thanks!
Private Sub Report_Activate()
Dim objChart As Graph.Chart
Dim objAxis As Graph.Axis
Set objChart = Me!Graph0.Object
Set objAxis = objChart.axes(2)
If objAxis.Type = 2 Then
objAxis.maximumscale = 90
objAxis.minimumscale = 60
End If
End Sub