Update as scheduled

J

John B

Hi,

When using UpdateProject method, you can only update the selected task(s) or
all the tasks in the project. Is there a way to update as scheduled without
selecting the tasks.

i.e. have a loop like

for each task in activeproject.tasks
task.updateasscheduled
next task

John B
 
J

Jan De Messemaeker

Hi,

No, I'm sorry.
You can use selectrow to select the task(s) you want to update than use
UpdateProject.
HTH
 
J

John

John B said:
Hi,

When using UpdateProject method, you can only update the selected task(s) or
all the tasks in the project. Is there a way to update as scheduled without
selecting the tasks.

i.e. have a loop like

for each task in activeproject.tasks
task.updateasscheduled
next task

John B

John,
There is no "updateasscheduled" property. There is however an
"UpdateProject" property that applies to the Application Object. It is
essentially the VBA equivalent of the menu initiated function. So I
guess the bottom line is, "no", the tasks have to be selected (if the
update is for something less than the whole project).

If for some reason you want to select the tasks via code rather than
through user input, no problem. All you need is some criteria for making
the selection, filtering on it and then using something like the
following:

SelectTaskColumn
For Each t in ActiveSelection.Tasks
[do your stuff]
Next t

John
Project MVP
 
J

John B

Thanks for the responses all!

I guess there is no such method in Project.

One must select the task and update as scheduled using the application object.

It just doesn't seem as "clean" to do it this way and perhaps may be slower
as well.

John B
 
J

John

John B said:
Thanks for the responses all!

I guess there is no such method in Project.

One must select the task and update as scheduled using the application object.

It just doesn't seem as "clean" to do it this way and perhaps may be slower
as well.

John B

John,
You're welcome. One man's "clean" may be another man's dirty so it's all
relative. I agree however that anytime data must be selected before an
operation can be performed, the process will be slower. You can't always
get what you want.

John
 

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