Errors Changing Chart Axis Value Scale in Macro (152759)
The information in this article applies to:
- Microsoft Excel for Windows 95 7.0a
- Microsoft Excel for Windows 5.0c
- Microsoft Excel for Windows NT 5.0
- Microsoft Excel for the Macintosh 5.0a
This article was previously published under Q152759 SYMPTOMS
When you set the axis values on a chart through a macro using the
MimimumScale and/or MaximumScale properties, you may receive the following
error message:
Run-Time Error 1005:
"Maximum axis value must be greater than minimum axis value. "
CAUSE
The error message may appear if the following is true:
- The values are calculated in the macro.
-and-
- The value that you are setting is outside the range of the current
values.
NOTE: If the new values are hard coded into the macro, instead of using
calculated values, you will not receive the error message.
RESOLUTION
To resolve the error message, reverse the order of the commands in the
macro. For example, if you are setting the low (minimum) value first and
that is the line of code that is generating the error message, set the high
(maximum) value first. If you are setting the high (maximum) value first
and that is the line of code that is generating the error message, set the
low (minimum) value first.
REFERENCES
For more information about changing the value axis scale, click the Search
button in Help and type:
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbprb kbProgramming KB152759 |
---|
|