Changing Project Default Settings in an Existing Project

B

bob1122

I have a project that was created with 6h work days. Also the tasks were
Fixed Units type. I want to change all tasks to Fixed Duration type (keeping
the same duration) and change to 8h work days. When I change to 8h work
days, the durations are reduced to 75% of the original values. Is there a
way to do this without changing each task individually? Thanks.
 
J

Jan De Messemaeker

Hi Bob,

Taking into account that Project always internally works by the minute what
you want is to multiply all durations by 8/6: to get the same expression in
8 hour days than you had in 6 hour days you need more hours of work.

The following macro could do this:

Sub SixTo8()
Dim Job as task
for each job in activeproject.tasks
if not job is nothing then
if not job.summary then
job.duration=job.duration*8/6
job.type=pjfixedduration
endif
endif
next job
activeproject.hoursperday=8
end sub

Alt+F11 shows teh VB Editor
In teh left pane select ProjectGlobal
Insert, Module
In teh code window paste the macro
Close VB Editor
Tools, Macro, Macros, select this one, run
 
B

bob1122

Hi Jan

Thanks very much for your help. The macro works very well! There are two
additional things that I would like to do. I would like to change from a 30h
week to a 40h week and I would like for the tasks NOT to be Effort Driven.
Thanks.
 
J

Jan De Messemaeker

Hi Bob,

If you want to change the week in Tools, Options, just do it. It will only
influence the display of the tasks where you explicitly used the week as the
unit to be displayed.

In the macro add within the loop
Job.effortdriven=false
But if you have already done the multiplication don't do it again :))

HTH
 
S

Steve House [Project MVP]

Actually the durations haven't changed at all. If you look at the start and
end times of the tasks you'll find that they are exactly the same as before
before you changed the hours per day value. All you have done is change the
definition of a standard day. If a task begins at 8am Monday and ends at
5pm, that task's duration is 8 hours. That means it is 1.25 days if the
"day" is defined as 6 hours but will show 1 day if the "day" is defined as 8
hours. But the actual time that the task is working is exactly the same
length of time regardless of what you choose to call a "day."
 

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