Scroll the Scoreboard

K

Kieranz

Hi All
Scene: I have about 150players. The screen can only display about 20
lines due to wide row height.

Need: A method to scroll 18 players scores every 20 seconds until the
last 20 players and then start all over again. I would also need to
stop or reset the procedure at any time.

Idea: Attach to a macro button which toggles between start/stop and
another button to reset. A cell value (in B2) to enter the seconds
interval eg 20 and another cell value (in C2) to enter players to
scroll eg 18. To do the scroll either using small scroll or hide the
rows not sure which is efficient.

Using: Vista Home Ed with Excel2003 and 2007
Many thks
Rgds
KZ
 
J

Joel

try this code. Manually create a Named item called Scroll. From worksheet
menu Insert - Name - Define. Put "Scroll" in top box and put in bottom box
="TRUE". then press the ADD button. Then run the code.


Sub StartScroll()
ThisWorkbook.Names("Scroll").RefersTo = "TRUE"
Call ScrollWindow
End Sub
Sub StopScroll()
ThisWorkbook.Names("Scroll").RefersTo = "FALSE"
Call ScrollWindow
End Sub

Sub ScrollWindow()
'
' Macro1 Macro
' Macro recorded 10/31/2008 by jwarburg
'
ActiveRow = ActiveCell.Row
If Range("A" & ActiveRow) = "" Then
ActiveWindow.ScrollRow = 1
Range("A1").Select
Else
ActiveWindow.ScrollRow = ActiveRow + 18
Range("A" & (ActiveRow + 18)).Select
End If
ScrollState = Mid(ThisWorkbook.Names("Scroll").RefersTo, 2)
If ScrollState = "TRUE" Then
Application.OnTime Now + TimeValue("00:00:20"), "ScrollWindow"
End If
End Sub
 
K

Kieranz

Joel
Many thks, just curious - which is efficient hiding rows or scrolling?
Will try the code over the weekend and get back to you.
Again many many thks
All the best Rgds KZ
 
J

Joel

It depends what you want the user of the workbook to see. You hide items
that don't need to be viewed, You scroll so the user will see the data you
want them to see.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top