ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   screen flickering (https://www.excelbanter.com/excel-programming/399263-screen-flickering.html)

ward376

screen flickering
 
Is there a way to "smooth" the movement while these lines execute?

For i = 1 To 360 Step 1
wb.ActiveChart.Rotation = i
x = Timer
While Timer - x < 0.01
Wend
Next


Mike

screen flickering
 
Application.ScreenUpdating = False 'Put at the beginning of your code

Application.ScreenUpdating = True 'Put at the end of your code


"ward376" wrote:

Is there a way to "smooth" the movement while these lines execute?

For i = 1 To 360 Step 1
wb.ActiveChart.Rotation = i
x = Timer
While Timer - x < 0.01
Wend
Next



Gary''s Student

screen flickering
 
Application.ScreenUpdating = False
before and
Application.ScreenUpdating = True
after
--
Gary''s Student - gsnu200749


"ward376" wrote:

Is there a way to "smooth" the movement while these lines execute?

For i = 1 To 360 Step 1
wb.ActiveChart.Rotation = i
x = Timer
While Timer - x < 0.01
Wend
Next



ward376

screen flickering
 
Mike/Gary's Student - keeping the screen from updating defeats the
purpose... this code rotates a 3d chart for viewing from all angles.



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

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