Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Scroll data into 3 columns | Excel Discussion (Misc queries) | |||
When I freeze rows I want it to scroll 1 at a time, not 3 at a tim | Excel Worksheet Functions | |||
Every time I scroll up or down, my picture disappears | Excel Discussion (Misc queries) | |||
Why does my tab key scroll over about 10 columns | Excel Discussion (Misc queries) | |||
Scroll two columns on right while left is stationary | Excel Discussion (Misc queries) |