palaeontology
Active Member
- Joined
- May 12, 2017
- Messages
- 444
- Office Version
- 2016
- Platform
- Windows
I have a sheet with the top three rows frozen.
I have a command button (CommandButton2) which, when pressed, should start the sheet automatically scrolling downwards just one row every 3 seconds. So because the top three rows are frozen, I'd like row 4 to scroll up out of sight after 3 seconds, then row 5 to scroll up out of sight after a further 3 seconds, etc etc etc.
After the sheet has scrolled to row 40, I'd like the automatic scrolling to stop
This is what I've tried so far, but it is not working at all ...
My vba is extremely poor, so it has taken me some time to get even to this stage. I apologise if it is embarrassingly incorrect.
Kindest regards,
Chris
I have a command button (CommandButton2) which, when pressed, should start the sheet automatically scrolling downwards just one row every 3 seconds. So because the top three rows are frozen, I'd like row 4 to scroll up out of sight after 3 seconds, then row 5 to scroll up out of sight after a further 3 seconds, etc etc etc.
After the sheet has scrolled to row 40, I'd like the automatic scrolling to stop
This is what I've tried so far, but it is not working at all ...
VBA Code:
Private Sub CommandButton2_Click()
For i = 4 To 40
Range("a4").Select
ActiveWindow.SmallScroll Down:=i
Application.Wait (Now + TimeValue("00:00:03"))
Next
End Sub
My vba is extremely poor, so it has taken me some time to get even to this stage. I apologise if it is embarrassingly incorrect.
Kindest regards,
Chris