W wsartorelli New Member Jan 21, 2011 #1 Hi, I need to change the "MaximumScale" and "MajorUnit" in a Excel Chart. What do I do? Help me. Thanks.
Hi, I need to change the "MaximumScale" and "MajorUnit" in a Excel Chart. What do I do? Help me. Thanks.
mrobles Member Jan 23, 2011 #2 Hi. ChExcelApp:Charts("Chart1"):Axes(2):MajorUnit = 100. ChExcelApp:Charts("Chart1").Axes(2):MinimumScale = 10. And more... ..... MaximumScale = 120. ..... MinorUnit = 20. ..... MinimumScaleIsAuto = True. ..... MaximumScale = 5.55. ..... MinorUnitIsAuto = True. ..... MajorUnitIsAuto = True. ..... Crosses = -4105. /* xlAutomatic */
Hi. ChExcelApp:Charts("Chart1"):Axes(2):MajorUnit = 100. ChExcelApp:Charts("Chart1").Axes(2):MinimumScale = 10. And more... ..... MaximumScale = 120. ..... MinorUnit = 20. ..... MinimumScaleIsAuto = True. ..... MaximumScale = 5.55. ..... MinorUnitIsAuto = True. ..... MajorUnitIsAuto = True. ..... Crosses = -4105. /* xlAutomatic */
W wsartorelli New Member Jan 24, 2011 #3 Hi, tanks... but the program display this message: Wrong number of parameters. Method component Axes call with < 2 parameters. I need help again.
Hi, tanks... but the program display this message: Wrong number of parameters. Method component Axes call with < 2 parameters. I need help again.
mrobles Member Jan 24, 2011 #4 Hi Try this. chWorksheet:ChartObjects("Gráfico 1"):Activate. chExcelApplication:ActiveChart:Axes(2,1):MajorUnit = 1. chExcelApplication:ActiveChart:Axes(2,1):MaximumScale = 10. In my chart X axis is alphanumeric Y axis is numeric This example change Y axis Usually I use http://msdn.microsoft.com/en-us/library/bb212495(v=office.12).aspx to see parameters and syntax. In this case, I suposse there is an error. MRobles
Hi Try this. chWorksheet:ChartObjects("Gráfico 1"):Activate. chExcelApplication:ActiveChart:Axes(2,1):MajorUnit = 1. chExcelApplication:ActiveChart:Axes(2,1):MaximumScale = 10. In my chart X axis is alphanumeric Y axis is numeric This example change Y axis Usually I use http://msdn.microsoft.com/en-us/library/bb212495(v=office.12).aspx to see parameters and syntax. In this case, I suposse there is an error. MRobles