Macros To Zero unnecessary steps

W

Windy

I have a master project with steps A, B, C and D (this is of course a
simplified version of the problem). Sometimes clients go with all steps, and
sometimes they go only with a subset. I want a macro for each variation.
For example, the macro BC would take steps A and D, set the days to zero and
mark both completed. All steps are linked, and this in essence will solve my
bigger much more compliated problem. In essence, this is a VBA qestion
specific to project.

Thanks in advance,

Windy
 
J

JackD

If you set a task to 100% complete it actually freezes the start and finish
date. The result would be that if you did this and then made task A shorter
or longer it would have no effect on task D. This is probably not what you
want. Perhaps the correct solution is to write a macro which would delete B
and C and create a dependency between A and D.

However, simplest of all would be to have one project set as a template for
AD and one for ABCD and choose the correct one at the time you start.
 
J

JackD

Yes.
The end date and start date will be the same.

My point is that if you set the tasks to be complete any changes in A will
not be reflected in D. Usually if there are dependencies you want the later
tasks to respond to changes in the earlier tasks.

If you are intent on keeping them in the project file I'd simply use a flag
field to identify B and C

sub Windy()
for each task in activeproject.tasks
if task.flag1 then
task.duration = 0
end if
next task
end sub

Then create a filter to filter them out.

If you want to delete them, then you need to work through the task
dependencies and cut them out and delete them.
Not hard to do if the dependencies are simple. Could be difficult if the
dependencies are complicated.
 

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