View Single Post
  #6  
Old July 1st 09, 07:05 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Changing calendar views

The key is the DateAdd() function. Change 28 days to 7 and you jump a week.
Change it to -28 and you jump back 4 weeks from today. Make a new macro for
each different date jump you want and name them appropriately.

For more on DateAdd() use the help.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Douglas Quaid" wrote in message
news

Thanks, Ken, this is good stuff. The one thing that worked a little
better for me was replacing "Date" with "Now" in the DateAdd code.
With "Date" it was going to 12 AM and then I would have to scroll down.
With "Now" it goes to the current time, which is perfect for me.

The only problem I still have is jumping forward or backward a week
from the currently selected date, as opposed to today's date. If you
could point me in the right direction for that I would really
appreciate it.




--
Douglas Quaid


Ads