MinimumScale method of Axis Object failed

A

Alex St-Pierre

Hi!
I have a macro that actualize a chart when the workbook is recalculate.
Using office 2007, I got an error (MinimumScale method of Axis Object has
failed). I don't know if this error is related to Office 2007 or not. I would
like to know if there's a way to avoid the error message (which happens not
very often). I have the same code in 4 sheets of the same workbook (each
sheet contains one graphic).
Thank you!
Alex

Private Sub Worksheet_Calculate()
With ChartObjects("Chart 1").Chart.Axes(xlValue)
.MinimumScale = Range("A51").Value
.MaximumScale = Range("A55").Value
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
End With
With ChartObjects("Chart 1").Chart.Axes(xlValue, xlSecondary)
.MinimumScale = Range("A51").Value - Range("C57").Value
.MaximumScale = Range("A55").Value - Range("C57").Value
End With
End Sub
 
B

Barb Reinhardt

I'd suggest you check the values you're plugging in. I wonder if the Maximum
value is less than the minimum.

HTH,
Barb Reinhardt
 

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