Macro To Scroll Worksheet Automatically ?

  • Thread starter Thread starter brazen234
  • Start date Start date
B

brazen234

Is it possible to scroll a worksheet automatically at a speed of m
choosing ? Hitting the scroll arrow moves it too quickly and using th
mouse wheel slowly going thru 10000 cells will make me insane. I'd lik
to be able to use a speed which gives me just a split second t
comprehend what is in the cell and then for the worksheet to scroll t
next cell. I figure three cells a second scroll speed would be abou
right.
As always, thanks for the help
 
Declare Sub Sleep Lib "kernel32.dll" ( _
ByVal dwMilliseconds As Long)
Const DELAY = 150&
Sub Scroll()
Set rng = ActiveWindow.VisibleRange
For i = 1 To 5
ActiveCell.Offset(rng.Rows.Count - 1, 1).Select
Sleep DELAY
Next i
End Sub

Change the value of DELAY to meet your needs.
 
Thanks for your input Tom. I ran the macro and it scrolled columns an
also each column scroll it jumped 55 rows so that by the end of th
macro the selected cell was F271. So I tinkered around and messed wit
the numbers and by changing the "Rng.Rows.Count" to "54,0" I was abl
to get the scroll to be rows down column A only.

Declare Sub Sleep Lib "kernel32.dll" ( _
ByVal dwMilliseconds As Long)
Const DELAY = 500&
Sub Scroll()
Set Rng = ActiveWindow.VisibleRange
For i = 1 To 100
ActiveCell.Offset(Rng.Rows.Count - 54, 0).Select
Sleep DELAY
Next i
End Sub

Altough this worked well on a non-filtered worksheet, it seams to b
skipping many cells on filtered selections. If you know what can b
done about this let me know. I'll probably be messing around with th
numbers to see what can be done
 
Try something like this

Declare Sub Sleep Lib "kernel32.dll" ( _
ByVal dwMilliseconds As Long)
Const DELAY = 50&
Sub Scroll()
For i = 1 To 10
Set rng = ActiveWindow.VisibleRange.Columns(1).Cells
Set rng = rng.SpecialCells(xlVisible)
Set rng1 = rng.Areas(rng.Areas.Count)
If rng1.Count = 1 Then _
Set rng1 = rng.Areas(rng.Areas.Count - 1)
rng1(rng1.Count).Select
ActiveWindow.ScrollRow = rng1.Row
Debug.Print rng1(rng1.Count).Address
Sleep DELAY
Next i
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top