brianfosterblack
Active Member
- Joined
- Nov 1, 2011
- Messages
- 251
The following macro is supposed to display the scores of a competition on a screen, moving down the scores until all have been displayed.
It worked fine in Excel 2003 but in 2007 or 2010 the screen does not refresh after the cursor has moved down to the fouth or fifth line of the results.
Sub LoopDisplayView()
Dim PauseTime, Start, Finish, TotalTime
Do Until ActiveCell = ""
If ActiveCell = "" Then
Exit Sub
Else
PauseTime = Range("display!AA4") ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
Loop
Finish = Timer ' Set end time.
TotalTime = Finish - Start ' Calculate total time.
ActiveCell.Offset(1, 0).Range("A1").Select
End If
Loop
End Sub
The above is a subroutine of a macro which then sorts the results into categories and classifications and shows all these before starting again. any idea what I am doing wrong?
It worked fine in Excel 2003 but in 2007 or 2010 the screen does not refresh after the cursor has moved down to the fouth or fifth line of the results.
Sub LoopDisplayView()
Dim PauseTime, Start, Finish, TotalTime
Do Until ActiveCell = ""
If ActiveCell = "" Then
Exit Sub
Else
PauseTime = Range("display!AA4") ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
Loop
Finish = Timer ' Set end time.
TotalTime = Finish - Start ' Calculate total time.
ActiveCell.Offset(1, 0).Range("A1").Select
End If
Loop
End Sub
The above is a subroutine of a macro which then sorts the results into categories and classifications and shows all these before starting again. any idea what I am doing wrong?