Automatic Row Scrolling

ramshakku

New Member
Joined
Sep 26, 2014
Messages
8
Hi,

I have excel file with 1045 rows, which I needs to display in the display board.
I will zoom the excel file to display for the first 20 rows, thereafter that excel sheet should auto scroll one row after with time interval of 1 second.
After it reaches last row, automatically it has to be redirected to the 1 st row.
This iteration should happen endlessly.
How to accomplish the above requirement ? Need your best support dears.

Regards,
Ram
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Code:
Sub ScrollMe()

For i = 1 To 1045
    Application.Wait (Now + TimeValue("00:00:01"))
    ActiveWindow.SmallScroll Down:=1
Next i

ActiveWindow.SmallScroll Up:=1045

Call ScrollMe

End Sub
 
Upvote 0
Here's another method. Run Scroll_Start to start the scrolling and run Scroll_Stop to stop or before you close the worksheet.

Code:
[color=darkblue]Public[/color] NextTime [color=darkblue]As[/color] [color=darkblue]Date[/color] [color=green]'Place this at the very top of the code module[/color]
    
[color=darkblue]Sub[/color] Scroll_Start()
    NextTime = Now + TimeValue("00:00:01")  [color=green]'One second interval[/color]
    [color=darkblue]If[/color] ActiveWindow.VisibleRange.Rows(1).Row < (1045 - 20) [color=darkblue]Then[/color]
        ActiveWindow.SmallScroll Down:=1
    [color=darkblue]Else[/color]
        ActiveWindow.ScrollRow = 1
    [color=darkblue]End[/color] [color=darkblue]If[/color]
    Application.OnTime NextTime, "Scroll_Start"
[color=darkblue]End[/color] [color=darkblue]Sub[/color]
    
[color=darkblue]Sub[/color] Scroll_Stop()
    [color=darkblue]On[/color] [color=darkblue]Error[/color] [color=darkblue]Resume[/color] [color=darkblue]Next[/color]
    Application.OnTime NextTime, "Scroll_Start", Schedule:=[color=darkblue]False[/color]
[color=darkblue]End[/color] Sub
 
Upvote 0

Forum statistics

Threads
1,215,457
Messages
6,124,941
Members
449,197
Latest member
k_bs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top