PLEASE IGNORE...THE PROBLEM IS SOLVED (TYPO)...Sorry!
Here is VBA:
The following two statements from above execute without error
However, the following statements [from above] give "Runtime error 438, object doesn't support this property or method"
In the immediate window, the variables MinChrt and MaxChrt give the same values as in the code, 174 and 184
Any idea what is going on, or how i can set these Axis properties to a variable value that is computed by the code?
Thanks!
Here is VBA:
VBA Code:
Sub tst_axis()
Dim MinChrt As Double
Dim MaxChrt As Double
Sheets("c.Wt").Select
ActiveSheet.ChartObjects("Chart 1").Activate
MinChrt = Application.WorksheetFunction.Floor(Application.WorksheetFunction.Min([ChWt_InstWt.Y]), 1)
MaxChrt = Application.WorksheetFunction.Ceiling(Application.WorksheetFunction.Max([ChWt_InstWt.Y]), 1)
ActiveChart.Axes(xlValue).MinimumScale = 174
ActiveChart.Axes(xlValue).MaximumScale = 184
ActiveChart.Axes(xlValue).MinumumScale = MinChrt
ActiveChart.Axes(xlValue).MaximumScale = MaxChrt
End Sub
The following two statements from above execute without error
VBA Code:
ActiveChart.Axes(xlValue).MinimumScale = 174
ActiveChart.Axes(xlValue).MaximumScale = 184
However, the following statements [from above] give "Runtime error 438, object doesn't support this property or method"
VBA Code:
ActiveChart.Axes(xlValue).MinumumScale = MinChrt
ActiveChart.Axes(xlValue).MaximumScale = MaxChrt
In the immediate window, the variables MinChrt and MaxChrt give the same values as in the code, 174 and 184
VBA Code:
?MinChrt
174
?MaxChrt
184
Any idea what is going on, or how i can set these Axis properties to a variable value that is computed by the code?
Thanks!
Last edited: