write a macro in MS project that hides a task to be deleted and re

J

Joy

when delete a task in project, we should have a macro in MS project that
hides it (data remain intact) and removes all dependencies. can you give me
some idea?

thank you so much
 
J

Jack Dahlgren MVP

Sorry,
You can only filter out the task, but it will still be present and
contribute to work, percent complete etc.
One way to do this is to set the duration to 0 and use the notes field to
log information about the original task details.

-Jack Dahlgren
 
J

Joy

I want to remove all dependencies. but keep the task.
you mean I cannot do it ????

thank you for your reply.
 
J

Jack Dahlgren MVP

Sure, you can remove all dependencies too.
You can keep the task, but it will still be in the project.

-Jack
 
J

Joy

thank you.

I am fresh new to MS project and VBA

Could you give me some idea of how to write a macro to delete all
dependencies of a specified task??

Thank you
 
J

Joy

I mean, when deleting a task, the macro is to delete all its dependencies

but the task may remain , we will think of other ways to deal withi this

but how to delete dependencies???

thank you soooo much
 
J

Joy

thank you so much.




Jack Dahlgren MVP said:
Joy,

In Project 2007 you can use this to delete all dependencies to a selected
task:

Sub deleteDependencies()
Dim t As Task
Dim dep As TaskDependency
Set t = ActiveSelection.Tasks(1)
For Each dep In t.TaskDependencies
dep.Delete
Next dep
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