Programmatically alter start and finsh dates for whole project

K

King

Hi,

Was wondering if someone could point me in the right direction.

I am using project 98 and have a large file containing a number of tasks,
each with start and finish dates.

Rather than recreate the file each year, I would like to use this report as
a base "template" and have a macro or script that would simply alter or
increment the existing "year" value for start and finish times to the next
year.


Example:

(have this now)

Task Start End
============ ========== ==========
Order Materials Mon 4/28/03 Tues 4/29/03

(want this after run script)
Task Start End
============ ========== ==========
Order Materials Mon 4/28/04 Tues 4/29/04


Thanks
 
R

Rod Gill

Hi,

Simplest solution is that all tasks are linked so you edit the Project start
date (Project, Project information) and the schedule re-calculates.

In Project 98 select tools, macros, Macros
Run the AdjustDates macro and it will change all dates for you.

In Project 2000 onwards, run this from the Analysis toolbar.

--
Rod Gill
Project MVP
For Microsoft Project companion projects, best practices and Project VBA
development services
visit www.projectlearning.com/
 
S

Steve House

A couple of problems with your approach. First and formost, the calendar
just doesn't work the way you assert - 4/28/03 is indeed a Monday but
4/28/04 is a Wednesday. That means that some tasks that were scheduled for
regular workdays in the first file could easily all on non-working days in
the following year if all you do is change the year while leaving the month
and day the same. Another problem is that you do not specify start and
finish dates for tasks in Project - if you specify dates for tasks at all,
which is extremely unwise to begin with, you specify the start date and the
expected duration and project calculates the finish date, or vice versa. A
far better approach is to specify the project start date, the estimated
duration of the tasks, and the logical relationship between them and let
Project calculate all the start and finish dates for individual tasks from
that information.
 
S

Sarah

It is possible to save a project as a template, as well. If you have
all of the tasks and dependencies the way you like, click File>Save As
and select "Template (.mpt)" in the Save as type field. It will ask
you if you want to save certain information in the template. Do not
select Baseline Values or Actual Values. When you use this template in
the future, open it, click Project>Project Information and change the
start date. This should adjust all of the dates in the plan, which you
then save as your new project plan.

Sarah
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top