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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
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,214,951
Messages
6,122,442
Members
449,083
Latest member
Ava19

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