ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reduce Flashing (https://www.excelbanter.com/excel-programming/371603-reduce-flashing.html)

Zone

Reduce Flashing
 
Excel 2002. My workbook has about 30 worksheets which I activate
sequentially to simulate animation. Problem is, Excel seems to want to
clear each worksheet in turn as it is activated and then re-display all
the drawing objects on it. This causes a distracting flashing as the
worksheets are activated. Is there a workaround for this? TIA, James


Trevor Shuttleworth

Reduce Flashing
 
Try:

Application.ScreenUpdating = False
' your code
Application.ScreenUpdating = True

Regards

Trevor


"Zone" wrote in message
oups.com...
Excel 2002. My workbook has about 30 worksheets which I activate
sequentially to simulate animation. Problem is, Excel seems to want to
clear each worksheet in turn as it is activated and then re-display all
the drawing objects on it. This causes a distracting flashing as the
worksheets are activated. Is there a workaround for this? TIA, James




Zone

Reduce Flashing
 
Thank you, Trevor, but application.screenupdating=False prevents the
display of the various sheets. Evidently, if I put this instruction in
before the next sheet is activated, the screen fails to show the next
sheet. If I put it after the next sheet is activated, it's too late to
prevent the sheet from updating itself. James

Trevor Shuttleworth wrote:
Try:

Application.ScreenUpdating = False
' your code
Application.ScreenUpdating = True

Regards

Trevor


"Zone" wrote in message
oups.com...
Excel 2002. My workbook has about 30 worksheets which I activate
sequentially to simulate animation. Problem is, Excel seems to want to
clear each worksheet in turn as it is activated and then re-display all
the drawing objects on it. This causes a distracting flashing as the
worksheets are activated. Is there a workaround for this? TIA, James



NickHK[_3_]

Reduce Flashing
 
As your need to show each step of the "animation", that is what you are
seeing. If there are blocks of code that you do not need the user see, then
sandwich them in .DisplayAlerts=false/True statements.
Not sure, but playing with Application.Calculation and possibly
Worksheet.DisplayPageBreaks, may help.

NickHK

"Zone"
egroups.com...
Excel 2002. My workbook has about 30 worksheets which I activate
sequentially to simulate animation. Problem is, Excel seems to want to
clear each worksheet in turn as it is activated and then re-display all
the drawing objects on it. This causes a distracting flashing as the
worksheets are activated. Is there a workaround for this? TIA, James




Greg Glynn

Reduce Flashing
 
Another thing to try is putting

Application.Screenupdating = True
Application.Screenupdating = False

.... pairs of code-lines at the places in your process that you want to
see what has been updated. It has the effect of redrawing the screen
and then freezing it again.


NickHK[_3_]

Reduce Flashing
 
Yes, that I meant, not .DisplayAlerts.
Don't know where taht came from.

NickHK

"Greg Glynn"
egroups.com...
Another thing to try is putting

Application.Screenupdating = True
Application.Screenupdating = False

... pairs of code-lines at the places in your process that you want to
see what has been updated. It has the effect of redrawing the screen
and then freezing it again.





All times are GMT +1. The time now is 07:12 PM.

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