Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
flashing screen
I have written the following code which displays a moving
series of data in a couple of charts. It works, but there is a lot of flashing and flickering while it is running. Can someone tell me how to eliminate the screen flashing?? Sub xdayplayer() Dim counter As Long Dim begin As Long Dim ending As Long Dim cent As Long ' Do counter = Worksheets("DATA").[ah1].Value begin = counter + 1 ending = counter + 781 cent = ending - 100 counter = counter + 1 Worksheets("DATA").[ah1].Value = counter Application.ScreenUpdating = False ActiveSheet.ChartObjects("Chart 21").Activate ActiveChart.SeriesCollection(1).Values = "=DATA!R" & cent & "C13:R" & ending & "C13" ActiveChart.SeriesCollection(2).Values = "=DATA!R" & cent & "C20:R" & ending & "C20" ActiveSheet.ChartObjects("Chart 18").Activate ActiveChart.SeriesCollection(1).Values = "=DATA!R" & begin & "C17:R" & ending & "C17" ActiveChart.SeriesCollection(2).Values = "=DATA!R" & begin & "C24:R" & ending & "C24" Application.ScreenUpdating = True Loop While counter < 10000 End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
flashing screen
Hi
Put Application.ScreenUpdating = False OUTSIDE your Do - While loop. HTH. best wishes Harald "Paul" skrev i melding ... I have written the following code which displays a moving series of data in a couple of charts. It works, but there is a lot of flashing and flickering while it is running. Can someone tell me how to eliminate the screen flashing?? Sub xdayplayer() Dim counter As Long Dim begin As Long Dim ending As Long Dim cent As Long ' Do counter = Worksheets("DATA").[ah1].Value begin = counter + 1 ending = counter + 781 cent = ending - 100 counter = counter + 1 Worksheets("DATA").[ah1].Value = counter Application.ScreenUpdating = False ActiveSheet.ChartObjects("Chart 21").Activate ActiveChart.SeriesCollection(1).Values = "=DATA!R" & cent & "C13:R" & ending & "C13" ActiveChart.SeriesCollection(2).Values = "=DATA!R" & cent & "C20:R" & ending & "C20" ActiveSheet.ChartObjects("Chart 18").Activate ActiveChart.SeriesCollection(1).Values = "=DATA!R" & begin & "C17:R" & ending & "C17" ActiveChart.SeriesCollection(2).Values = "=DATA!R" & begin & "C24:R" & ending & "C24" Application.ScreenUpdating = True Loop While counter < 10000 End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
flashing screen
Sub xdayplayer()
Dim counter As Long Dim begin As Long Dim ending As Long Dim cent As Long ' Application.ScreenUpdating = False Do counter = Worksheets("DATA").[ah1].Value begin = counter + 1 ending = counter + 781 cent = ending - 100 counter = counter + 1 Worksheets("DATA").[ah1].Value = counter ActiveSheet.ChartObjects("Chart 21").Activate ActiveChart.SeriesCollection(1).Values = "=DATA!R" & cent & "C13:R" & ending & "C13" ActiveChart.SeriesCollection(2).Values = "=DATA!R" & cent & "C20:R" & ending & "C20" ActiveSheet.ChartObjects("Chart 18").Activate ActiveChart.SeriesCollection(1).Values = "=DATA!R" & begin & "C17:R" & ending & "C17" ActiveChart.SeriesCollection(2).Values = "=DATA!R" & begin & "C24:R" & ending & "C24" Loop While counter < 10000 Application.ScreenUpdating = True End Sub -- Regards, Tom Ogilvy "Paul" wrote in message ... I have written the following code which displays a moving series of data in a couple of charts. It works, but there is a lot of flashing and flickering while it is running. Can someone tell me how to eliminate the screen flashing?? Sub xdayplayer() Dim counter As Long Dim begin As Long Dim ending As Long Dim cent As Long ' Do counter = Worksheets("DATA").[ah1].Value begin = counter + 1 ending = counter + 781 cent = ending - 100 counter = counter + 1 Worksheets("DATA").[ah1].Value = counter Application.ScreenUpdating = False ActiveSheet.ChartObjects("Chart 21").Activate ActiveChart.SeriesCollection(1).Values = "=DATA!R" & cent & "C13:R" & ending & "C13" ActiveChart.SeriesCollection(2).Values = "=DATA!R" & cent & "C20:R" & ending & "C20" ActiveSheet.ChartObjects("Chart 18").Activate ActiveChart.SeriesCollection(1).Values = "=DATA!R" & begin & "C17:R" & ending & "C17" ActiveChart.SeriesCollection(2).Values = "=DATA!R" & begin & "C24:R" & ending & "C24" Application.ScreenUpdating = True Loop While counter < 10000 End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Screen flashing | Excel Discussion (Misc queries) | |||
How to stop the screen from 'flashing' when copying and pasting | Excel Discussion (Misc queries) | |||
Screen flashing why? | Excel Discussion (Misc queries) | |||
Can I stop Excel program flashing on screen during run | Excel Programming | |||
flashing screen driving me bonkers! | Excel Programming |