stopping charts from resizing ?

Alex Starr

New Member
Joined
Aug 6, 2011
Messages
4
I have created charts in Exc 2007 workbook converted to xls for compatibility. All charts all correctly sized upon 1st opening but once someone does anything in the workbook they move and enlarge. Once the workbook is closed and re-opened all goes back to normal until any more changes to any part of the workbook are made...is there an easy fix for this??? Driving me crazy:confused:

thanks
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Set the Chart Properties to "Don't move or size with cells".

To do this:
Click on your chart.
In your Chart Tools menu, click Format.
Click the little dropdown arrow to the right of the group label ("Size").
This opens up the Size and Properties dialogbox.
On the Properties tab, check "Don't move or size with cells".
You will have to do this for each Chart.
 
Upvote 0
Hello,

Here is some code found at egghead:



<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> FreezeCharts()<br>  <SPAN style="color:#00007F">Dim</SPAN> w <SPAN style="color:#00007F">As</SPAN> Worksheet, c <SPAN style="color:#00007F">As</SPAN> ChartObject<br>  <SPAN style="color:#00007F">For</SPAN> <SPAN style="color:#00007F">Each</SPAN> w <SPAN style="color:#00007F">In</SPAN> ThisWorkbook.Worksheets<br>    <SPAN style="color:#00007F">For</SPAN> <SPAN style="color:#00007F">Each</SPAN> c <SPAN style="color:#00007F">In</SPAN> w.ChartObjects<br>      c.Placement = xlFreeFloating<br>    <SPAN style="color:#00007F">Next</SPAN><br>  <SPAN style="color:#00007F">Next</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>



Should work for all the chart within the workbook.

To use:
Copy the above code
Press Alt + F11
Kestrokes Alt - I - M
Paste into the code pane
Press F5
 
Upvote 0
OK, unfortunately neither worked. I have figured out that if I open the workbooks, Enable Content and Macros (which is what is causing this to begin with since I don't have this issue if I don't do that but I need it for this particular workbook), as long as I actually look at the sheets with the graphs then no changes. But any sheets that I have not physically looked at before saving any changes sucumb to the "curse" of the moving and enlarging charts...
I am going to try to set up a macro that "looks" at them for me and although not ideal, see if that works.

Thank you for everyone's help. Not sure why this is such a stupid effect:)

Still, if anyone has other thoughts or has come accross this I am all ears!
 
Upvote 0
SUCCESS!!! Recorded a silly little "view" macro which just glances at the sheets containing Charts and once that is run just once all the changes can be made anywhere in the workbook and no impact to charts.... yeay.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top