LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default scroll a few columns at a time

Try (untested):

Sub MoveLeft()
ActiveWindow.ScrollColumn = Rows(1).Find _
("Mon", Intersect(Columns(ActiveWindow.ScrollColumn), _
Rows(1)), , , xlPrevious).Column
End Sub

__________________________________________________ _______________________


"Tendresse" wrote in message
...
Thank you very much. This was really helpful. Your code enables me to
scroll
one week at a time towards the right. Then when i reach the last week, it
goes back to week 1. That's perfect.

But suppose i'm viewing week 2 and want to go back to week 1. I'll have to
click a few times to reach the end of the month before i can view week 1.

Therefore, i think i need to have another button that does exactly the
same
but towards the left. Meaning to move to the PREVIOUS Monday. What do i
need
to change in the code to achieve this?

Thanks again,

Tendresse

"Vasant Nanavati" wrote:

An example:

Sub MoveRight()
ActiveWindow.ScrollColumn = Rows(1).Find _
("Mon", Intersect(Columns(ActiveWindow.ScrollColumn), _
Rows(1))).Column
End Sub

There are probably easier ways.
__________________________________________________ _____________________

"Tendresse" wrote in message
...
I'm making a calendar where each column represents one day and each row
represents a month. It looks something like this:

A B C D ....... I J
.......
P Q
Month Mon Tue Wed ...... Mon Tue ..... Mon Tue
Jan 1 2 3 15 16 ....
22
23
Feb 12 13 ....
19 20

Row 1 and Column A are frozen, (always displayed in the screen).

I would like to design a 'fast forward' button. When clicked, this
buttons
scrolls horizontally to the right to put the nearest MONDAY (on the
right)
adjacent to Column A. and similarly a 'Rewind' button that scrolls
horizontally to the left to put the nearest MONDAY (on the left)
adjacent
to
Column A.

In other words, i want to be able to scroll horizontally one week at a
time
whether it's forward or backward.

i'm using Excel 2003.

Many thanks
Tendresse






 
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
Scroll data into 3 columns Brenda from Michigan Excel Discussion (Misc queries) 2 April 3rd 09 05:02 PM
When I freeze rows I want it to scroll 1 at a time, not 3 at a tim jjason13 Excel Worksheet Functions 2 December 4th 08 09:39 PM
Every time I scroll up or down, my picture disappears Jennifer Excel Discussion (Misc queries) 0 June 12th 07 10:46 PM
Why does my tab key scroll over about 10 columns chuckatsca Excel Discussion (Misc queries) 2 March 10th 06 11:18 PM
Scroll two columns on right while left is stationary widman Excel Discussion (Misc queries) 2 September 28th 05 04:59 PM


All times are GMT +1. The time now is 03:41 AM.

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

About Us

"It's about Microsoft Excel"