Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro To Scroll Worksheet Automatically ?
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 -- brazen23 ----------------------------------------------------------------------- brazen234's Profile: http://www.excelforum.com/member.php...nfo&userid=995 View this thread: http://www.excelforum.com/showthread.php?threadid=49936 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro To Scroll Worksheet Automatically ?
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. -- Regards, Tom Ogilvy "brazen234" wrote in message ... Is it possible to scroll a worksheet automatically at a speed of my choosing ? Hitting the scroll arrow moves it too quickly and using the mouse wheel slowly going thru 10000 cells will make me insane. I'd like to be able to use a speed which gives me just a split second to comprehend what is in the cell and then for the worksheet to scroll to next cell. I figure three cells a second scroll speed would be about right. As always, thanks for the help. -- brazen234 ------------------------------------------------------------------------ brazen234's Profile: http://www.excelforum.com/member.php...fo&userid=9952 View this thread: http://www.excelforum.com/showthread...hreadid=499366 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro To Scroll Worksheet Automatically ?
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 -- brazen23 ----------------------------------------------------------------------- brazen234's Profile: http://www.excelforum.com/member.php...nfo&userid=995 View this thread: http://www.excelforum.com/showthread.php?threadid=49936 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro To Scroll Worksheet Automatically ?
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 -- Regards, Tom Ogilvy "brazen234" wrote in message ... Thanks for your input Tom. I ran the macro and it scrolled columns and also each column scroll it jumped 55 rows so that by the end of the macro the selected cell was F271. So I tinkered around and messed with the numbers and by changing the "Rng.Rows.Count" to "54,0" I was able 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 be skipping many cells on filtered selections. If you know what can be done about this let me know. I'll probably be messing around with the numbers to see what can be done. -- brazen234 ------------------------------------------------------------------------ brazen234's Profile: http://www.excelforum.com/member.php...fo&userid=9952 View this thread: http://www.excelforum.com/showthread...hreadid=499366 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro To Run Automatically For Any Worksheet Upon Opening Of THe F | Excel Discussion (Misc queries) | |||
How to add a worksheet automatically using macro in xls? | Excel Worksheet Functions | |||
Run macro automatically on opening of worksheet | Excel Worksheet Functions | |||
Automatically Run a macro when a worksheet is selected | Excel Programming | |||
Automatically Run a macro when a worksheet is selected | Excel Programming |