View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Excel User Excel User is offline
external usenet poster
 
Posts: 34
Default Consolidating Code

Thanks--I greatly appreciate your help.
Regards.
EU

"ben" wrote:

only the last command in each set counts

scrollcolumn automatically puts what ever column number you put as the
leftmost column, it is not a series of scrolls added together
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1

accomplishes the same exact thing as

activewindow.scrollcolumn = 1



"Excel User" wrote:

How can I consolidate the following code so that it improves execution time?
I recorded "scrolling" in my macro, and I'd like to consolidate every
discreet line/column scroll command.

ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollRow = 5
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 1

...so that it resembles something like this:
"ActiveWindow.ScrollColumn = 4:1"
"ActiveWindow.ScrollRow = 5:1"

Thanks you.