ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Slow excel because of shapes? (https://www.excelbanter.com/excel-programming/401479-slow-excel-because-shapes.html)

Stentko

Slow excel because of shapes?
 
I have made a rather graphic interface for one of my models and in this
interface a use a lot of shapes, some of which I use as buttons. The problem
is that excel redraws all the shapes, even when for instants only one or two
shapes change color. This causes excel to run very slow, resulting in about
0,5 sec of redraw time, every time you push a button. I have tried:

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False

My question: how can I use a large amount of shapes without excel slowing
down?

I am using Excel 2003.


Nick Hebb[_2_]

Slow excel because of shapes?
 
If there are some that you could Group into a single object? That
should speed up rendering.

Peter T

Slow excel because of shapes?
 
Roughly how many shapes are do you have, and what exactly are you doing that
causes your shapes to redraw, and how are you changing colour (eg change
Colorindex, RGB-color, customize palette)

FWIW, I don't have any problem with say 1,000 shapes on a sheet in my old
slow system, except notably shapes with 2-color diagonal gradient fill's
which are very slow to redraw (even in more modern systems).

The application settings you mention are unlikely to help, disabling
calculation or events will do nothing in this respect (unless some event
directly leads to a redraw). Disabling screen updating can help if changing
things in a loop though, depending on context, can actually make the problem
worse if when re-enabled causes an unnecessary redraw. On which point, are
you by chance toggling screenupdating on/off in some loop - if so ensure you
don't.

Regards,
Peter T


"Stentko" wrote in message
...
I have made a rather graphic interface for one of my models and in this
interface a use a lot of shapes, some of which I use as buttons. The

problem
is that excel redraws all the shapes, even when for instants only one or

two
shapes change color. This causes excel to run very slow, resulting in

about
0,5 sec of redraw time, every time you push a button. I have tried:

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False

My question: how can I use a large amount of shapes without excel slowing
down?

I am using Excel 2003.




Stentko

Slow excel because of shapes?
 
I removed one shape with a 2-color gradient and the problem is solved,
strange...

Thank you very much, this saves me a lot of time!

Regards,
Stentko

"Peter T" wrote:

Roughly how many shapes are do you have, and what exactly are you doing that
causes your shapes to redraw, and how are you changing colour (eg change
Colorindex, RGB-color, customize palette)

FWIW, I don't have any problem with say 1,000 shapes on a sheet in my old
slow system, except notably shapes with 2-color diagonal gradient fill's
which are very slow to redraw (even in more modern systems).

The application settings you mention are unlikely to help, disabling
calculation or events will do nothing in this respect (unless some event
directly leads to a redraw). Disabling screen updating can help if changing
things in a loop though, depending on context, can actually make the problem
worse if when re-enabled causes an unnecessary redraw. On which point, are
you by chance toggling screenupdating on/off in some loop - if so ensure you
don't.

Regards,
Peter T


"Stentko" wrote in message
...
I have made a rather graphic interface for one of my models and in this
interface a use a lot of shapes, some of which I use as buttons. The

problem
is that excel redraws all the shapes, even when for instants only one or

two
shapes change color. This causes excel to run very slow, resulting in

about
0,5 sec of redraw time, every time you push a button. I have tried:

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False

My question: how can I use a large amount of shapes without excel slowing
down?

I am using Excel 2003.






All times are GMT +1. The time now is 06:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com