Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Excel size increase through charts

I have a excel sheet on which I place 5 charts, through vb code. Every
time a button is pressed, the code removes all charts on the sheet and
creates new ones with new data. Although the number of charts stay the
same and nothing is added extra to the sheet, it increases everytime I
press the button. It looks to me like the charts are not removed, but
stuck on the background ( not visible). If I look at the properties of
the new charts, the chart number doesn't start with number 1 as I
expect it to do.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Excel size increase through charts

What increases? File size?

The chart names assigned by Excel continue to increase. There's a kind of
memory of previously used shape numbers. This in itself does not indicate a
problem.

Are you deleting the chart objects on the sheet, or merely deleting the rows
or columns under the charts? If you delete the ranges, the charts will
remain, but scrunched into the top or side edge of the deleted range. You
can't see them because they are aligned with cell boundaries. You should do
something like

ActiveSheet.ChartObjects.Delete

at the beginning of your code.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"xyfix" wrote in message
oups.com...
I have a excel sheet on which I place 5 charts, through vb code. Every
time a button is pressed, the code removes all charts on the sheet and
creates new ones with new data. Although the number of charts stay the
same and nothing is added extra to the sheet, it increases everytime I
press the button. It looks to me like the charts are not removed, but
stuck on the background ( not visible). If I look at the properties of
the new charts, the chart number doesn't start with number 1 as I
expect it to do.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Excel size increase through charts

Are you sure your code deletes old charts. Eg, deleting rows/cols they are
contained in doesn't delete them, just makes them miniscule to the extent of
making them invisible.

Charts excluding their data don't occupy much file size, just the properties
of the chart.

If I look at the properties of
the new charts, the chart number doesn't start with number 1 as I
expect it to do.


That's normal and of it's own would not impact on file size, the object
counter is only reset if all objects of any kind are removed from the sheet
then save - close - re-open.

Regards,
Peter T


"xyfix" wrote in message
oups.com...
I have a excel sheet on which I place 5 charts, through vb code. Every
time a button is pressed, the code removes all charts on the sheet and
creates new ones with new data. Although the number of charts stay the
same and nothing is added extra to the sheet, it increases everytime I
press the button. It looks to me like the charts are not removed, but
stuck on the background ( not visible). If I look at the properties of
the new charts, the chart number doesn't start with number 1 as I
expect it to do.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Excel size increase through charts

I didn't see Jon's earlier reply before posting similar comments.

Peter T


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Excel size increase through charts

When you see it twice, it gives you some assurance of its validity.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Peter T" <peter_t@discussions wrote in message
...
I didn't see Jon's earlier reply before posting similar comments.

Peter T






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Excel size increase through charts

:-)

Though I guess the OP hasn't seen it at all !

Regards,
Peter T

"Jon Peltier" wrote in message
...
When you see it twice, it gives you some assurance of its validity.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Peter T" <peter_t@discussions wrote in message
...
I didn't see Jon's earlier reply before posting similar comments.

Peter T






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Excel size increase through charts

First of all, thank you ( Jon and Peter) for replying,

I was a little bit busy the last few days so I couldn't reply, but the
solution Jon gave on his first reply is OK and it works. After
executing the line code things got cleaned up and my sheet is now 455
kb instead of the 2.8 Mb. So thanks alot you guys.

xyfix

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel size increase Pyrite Excel Discussion (Misc queries) 0 October 15th 08 12:22 PM
Number in cell increase with increase in font size. Value increases with increase in font.[_2_] Excel Discussion (Misc queries) 2 August 9th 07 01:58 PM
Increase in the Size of the Excel WorkBook Sagu Excel Discussion (Misc queries) 1 January 19th 07 11:56 PM
Increase size of Legend Key in Pie Charts Mark Charts and Charting in Excel 4 August 8th 06 07:20 PM
can i increase the cell size in Excel? Bmorrison Excel Discussion (Misc queries) 1 April 27th 06 05:12 PM


All times are GMT +1. The time now is 09:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"