ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Scrolloing (https://www.excelbanter.com/excel-programming/416761-scrolloing.html)

Sandy

Scrolloing
 
Is there any way to code smooth scrolling in vba, such that the information
can be read as the scroll takes place. I suppose I mean a slow scroll.

I have tried .ScrollRow and .SmallScroll combined with Time Values which
does scroll slowly but jumpy.

Sandy


Mike H

Scrolloing
 
Sandy

Right click your sheet tab, View code and paste this in. It scrolls from a1
to the last used cell in column A at the rate of 1 row per second. Change the
time value to suit

Sub sonic()
lastrow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
Range("A1").Select
For x = 1 To lastrow
ActiveWindow.ScrollRow = activerow + x
Application.Wait Now + TimeValue("00:00:01")
Next
End Sub

Mike

"Sandy" wrote:

Is there any way to code smooth scrolling in vba, such that the information
can be read as the scroll takes place. I suppose I mean a slow scroll.

I have tried .ScrollRow and .SmallScroll combined with Time Values which
does scroll slowly but jumpy.

Sandy


Sandy

Scrolling
 
Replied earlier but didn't see it posted - so here goes again

Thanks Mike but what I was hoping for was a smooth scroll.
As it is it scrolls one row waits and then scrolls the next etc which
produces a stuttered effect. I was hoping for something similar (for
example)
to the sort of scrolling seen at the end of movies; a continuous smooth
scroll.
Maybe it can't be done.

Thanks again
Sandy


"Mike H" wrote in message
...
Sandy

Right click your sheet tab, View code and paste this in. It scrolls from
a1
to the last used cell in column A at the rate of 1 row per second. Change
the
time value to suit

Sub sonic()
lastrow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
Range("A1").Select
For x = 1 To lastrow
ActiveWindow.ScrollRow = activerow + x
Application.Wait Now + TimeValue("00:00:01")
Next
End Sub

Mike

"Sandy" wrote:

Is there any way to code smooth scrolling in vba, such that the
information
can be read as the scroll takes place. I suppose I mean a slow scroll.

I have tried .ScrollRow and .SmallScroll combined with Time Values which
does scroll slowly but jumpy.

Sandy



All times are GMT +1. The time now is 07:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com