I have the following code that returns an error, "Method 'MaximumScale' of object 'Axis' failed", on the line in red:
I've been told that line charts don't have the MaximumScale method on the Category axis. Is there a method that can be used instead that returns a similar value? This code is part of a Sub that sets the location of a TextBox shape based on where the mouse is.
Code:
With ActiveSheet.ChartObjects("Chart 3").Chart
[COLOR="#FF0000"]dblXScale = (.Axes(xlCategory).MaximumScale - .Axes(xlCategory).MinimumScale) / LArea.Width[/COLOR]
dblYScale = (.Axes(xlValue).MaximumScale - .Axes(xlValue).MinimumScale) / LArea.Height
End With
I've been told that line charts don't have the MaximumScale method on the Category axis. Is there a method that can be used instead that returns a similar value? This code is part of a Sub that sets the location of a TextBox shape based on where the mouse is.