Globally change task type

C

Chris

Hello,

How can I change all tasks in a project from default to fixed duration?

This is what I did:
- select the whole task column
- select Project > task information
- select fixed duration in task type

The problem is, when I do this the blank lines in my project automatically
get a 1 day duration, and then I have to clean up all these lines.

Thanks.
 
B

Brian K - Project MVP

Chris said:
Hello,

How can I change all tasks in a project from default to fixed duration?

This is what I did:
- select the whole task column
- select Project > task information
- select fixed duration in task type

The problem is, when I do this the blank lines in my project automatically
get a 1 day duration, and then I have to clean up all these lines.

Thanks.

Try to do Jacks suggestion but if you cannot then run this VBA:

Sub ChangeType()
Dim T As Task

For Each T In ActiveProject.Tasks
If Not (T Is Nothing) Then
T.Type = pjFixedDuration
End If
Next T
End Sub
 
C

Chris

Thanks Jack and Brian for the quick reply!

Brian K - Project MVP said:
Try to do Jacks suggestion but if you cannot then run this VBA:

Sub ChangeType()
Dim T As Task

For Each T In ActiveProject.Tasks
If Not (T Is Nothing) Then
T.Type = pjFixedDuration
End If
Next T
End Sub
 
J

JulieS

Hi Chris,

In addition to Jack and Brian's suggestions you can change the default to
all *new* tasks added to a project in Tools>Options, Schedule tab and change
the default task type. If you change the option before adding tasks to the
project file, all tasks will have the newly set default.

Hope this helps.
Julie
 
Joined
Apr 2, 2009
Messages
2
Reaction score
0
suggested code snippet fails

Project 2003 Standard SP3 running the VBA snippet:

Sub ChangeType()
Dim T As Task

For Each T In ActiveProject.Tasks
If Not (T Is Nothing) Then
T.Type = pjFixedDuration
End If
Next T
End Sub

Generates - Run-time error '1101': The argument value is not valid
watch shows pjFixedDuration as 1

Any changes I should make?
 
Joined
Apr 2, 2009
Messages
2
Reaction score
0
suggested code snippet fails - fix

This fixed it -

Sub ChangeType()
Dim T As Task

For Each T In ActiveProject.Tasks
If Not (T Is Nothing) Then
If T.Type <> pjFixedDuration Then
T.Type = pjFixedDuration
End If
End If
Next T
End Sub
 

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