interlocked task issue

J

Joy

in our macro, we can export ms project to a csv file and send the file to the
server for further process.
now, we consider master project and its sub projects. we may have a project
that contain sub projects in it.

what we want to do is when creating csv file, ignore tasks inside a linked
project.

task1
task2
sub project
sub project task 1
sub project task 2
task3
task4






task1
task2
sub project
task4
task4


the question is how can I know that this is a sub project but not a task?? I
notice that in the indicators, it shows that it is an inserted task, how can
i check and get the info using macros??

another thing is, if the projects interlocked, how can i check that ??
should I use Predecessors field to see whether thr filed is integer or not??

thanks
 
J

John

Joy said:
in our macro, we can export ms project to a csv file and send the file to the
server for further process.
now, we consider master project and its sub projects. we may have a project
that contain sub projects in it.

what we want to do is when creating csv file, ignore tasks inside a linked
project.

task1
task2
sub project
sub project task 1
sub project task 2
task3
task4






task1
task2
sub project
task4
task4


the question is how can I know that this is a sub project but not a task?? I
notice that in the indicators, it shows that it is an inserted task, how can
i check and get the info using macros??

another thing is, if the projects interlocked, how can i check that ??
should I use Predecessors field to see whether thr filed is integer or not??

thanks

Joy,
If I understand correctly you only want to create the csv file from
tasks that actually belong to the master (i.e. no subproject tasks).
Correct? If that's the case I would approach it by creating a filter to
only look at task rows that have the master project name in the Project
field. Then loop through all the tasks shown by the filter - those
belong to the master.

When you say "interlocked" I assume you really mean "interlinked" (i.e.
external predecessors/successors). There are various ways to check for
external links on tasks depending on what you want to do with those
tasks. One approach is to use the Find Method and check the Predecessor
field for an instance of the backslash ("\"). I use that particular
approach in one of my file conversion macros. If you simply want to
isolate tasks with external links, you could create a filter that looks
for the same backslash.

Hope this helps.
John
Project MVP
 
J

Joy

I searched Find method and I only see their use in excel,

how can i implment it in ms project,,,,,

I need to check if a task's predecessors is a task in another project file.

if it is, I need to modify the task's another filed.



many many thanks
 
J

John

Joy said:
I searched Find method and I only see their use in excel,

how can i implment it in ms project,,,,,

I need to check if a task's predecessors is a task in another project file.

if it is, I need to modify the task's another filed.



many many thanks

Joy,
To get the syntax for the FInd Method in Project VBA you need to make
sure you search only the MSProject object library in the Object Browser.
It sounds like you have the browser set to search all libraries.

Again, depending on whether you need to modify a particular field of
tasks with external links separately or as a group, the Find Method or
custom filter will get you there.

Hope this helps.
John
Project MVP
P.S. Next time you post, please proofread before you post. Thank you.
 

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