Mr. Excel, ?
I have a large list of dart tournament contestant names displaying the opponents and the board the match will be played upon. If I zoom the entire list on the monitor, people can't read the small text. Is there a formula or a macro that will slowly scroll down the list? Ultimately, I would like to press a button and have the screen slowly scroll down to the bottom of the list and then scroll back up to the top of the worksheet continuously until I press the button again. Can the scroll speed be varied? I have skimmed through several VBA reference manuals and this issue is not addressed.
An example of the continuous scrolling would be pressing down on a mouse with a wheel.
I found a macro in the forum that Mr. Kenneth Hobson replied to in a topic, and set a time for those lines with the code "" Application.Wait (Now + TimeValue ("0:00:01")) ", but no I'm managing to make the macro read a certain number of lines and go back to the beginning, for example: Start reading on A5 and finish on A15 and return to A5.
Thanks for your time!
I have a large list of dart tournament contestant names displaying the opponents and the board the match will be played upon. If I zoom the entire list on the monitor, people can't read the small text. Is there a formula or a macro that will slowly scroll down the list? Ultimately, I would like to press a button and have the screen slowly scroll down to the bottom of the list and then scroll back up to the top of the worksheet continuously until I press the button again. Can the scroll speed be varied? I have skimmed through several VBA reference manuals and this issue is not addressed.
An example of the continuous scrolling would be pressing down on a mouse with a wheel.
I found a macro in the forum that Mr. Kenneth Hobson replied to in a topic, and set a time for those lines with the code "" Application.Wait (Now + TimeValue ("0:00:01")) ", but no I'm managing to make the macro read a certain number of lines and go back to the beginning, for example: Start reading on A5 and finish on A15 and return to A5.
VBA Code:
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public inc As Integer
Sub ScrollNow()
Dim lastRow As Long, nextRow As Long
Application.ScreenUpdating = True
lastRow = ActiveSheet.UsedRange.Rows.Count
If inc <> 1 Or inc <> -1 Then
If ActiveCell.Row = lastRow Then
inc = -1
Else: inc = 1
End If
End If
On Error GoTo handleCancel
Application.EnableCancelKey = xlErrorHandler
Application.StatusBar = "To End: ESC, Ctrl+Break"
Do While 1 = 1 'infinite loop
If inc = 1 And lastRow = ActiveCell.Row Then inc = -1
If inc = -1 And ActiveCell.Row = 1 Then inc = 1
nextRow = ActiveCell.Row + inc
Application.Goto Range("A" & nextRow), True
Sleep 400
Application.Wait (Now + TimeValue("0:00:01"))
'Return to the top
End Sub
Loop
handleCancel:
Application.StatusBar = False
End Sub
Thanks for your time!