Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro To Run Automatically For Any Worksheet Upon Opening Of THe F BB[_2_] Excel Discussion (Misc queries) 2 July 22nd 08 10:55 PM
How to add a worksheet automatically using macro in xls? eva Excel Worksheet Functions 2 December 4th 07 11:16 PM
Run macro automatically on opening of worksheet bnkone Excel Worksheet Functions 1 February 13th 06 09:46 PM
Automatically Run a macro when a worksheet is selected Rob Bovey Excel Programming 2 October 19th 03 10:00 PM
Automatically Run a macro when a worksheet is selected Stephen Hartman Excel Programming 5 September 19th 03 09:28 AM


All times are GMT +1. The time now is 12:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"