Fine Beautiful Excel Vba Resize Chart Plot Area
VbaSub Macro1 Dim objCht As ChartObject For Each objCht In ActiveSheetChartObjects.
Excel vba resize chart plot area. To be able to resize a chart you must first select it you do that by left-click on the chart with the mouse. Note that the width will actually only be set to 100 if there is enough room within the chartarea to do it. If I move the legend to say bottom of the plot area right mouse click and Format LegendPlacementBottom the plot area itself automatically resizes to maximise the visibility.
So if you select the outside border of the chart and resize it the plot area will also resize. In Excel 2003 Im creating a very simple area chart with a legend placed to the right of the plot area. Hi With the help of your answers on my question of July 30 and some digging in excel4 I succeeded in making the inside of the plot area exactly a square with predefined dimensions.
This makes it difficult to distinguish the difference between the two areas of the chart. Click and hold with left mouse button on dots then drag to resize. I have fixed my charts to move and.
I made a function that finds the dimensions of a rectangle that encloses all elements in the plot including title axes-titles and text boxes. I have this code placed in the worksheet page of the vba editor. As a result the PlotArea top moves and resizes in height.
Define the size of plot area. By default you cannot resize the chart by dragging the edges you have to change the page borders in page setup. Try this just for chart objects.
However if I need to increase the plot area to do that the boundaries of the ChartArea will. Hold SHIFT key while dragging to keep the chart aspect ratio. Excel VBA Intro Intermediate course Stop charts from resizing plot area legend etc.