Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default MinimumScale method of Axis Object failed

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

--
Alex St-Pierre
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default MinimumScale method of Axis Object failed

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

"Alex St-Pierre" wrote:

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

--
Alex St-Pierre

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Method "Method 'Open' of object 'Workbooks' failed [email protected] Excel Programming 2 June 2nd 10 05:28 PM
Method Add of object Validation Failed - please help Shokie New Users to Excel 1 July 10th 09 01:34 PM
Method ‘Add’ of object ‘CommandbarControls’ failed sgltaylor Excel Programming 1 August 22nd 08 02:31 AM
method of axes of object failed Papa Jonah Excel Programming 2 October 20th 04 04:59 PM
Method ~ of Object ~ Failed. Joan Excel Programming 5 August 26th 03 08:13 PM


All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"