Forum Discussion
Robert0842
May 10, 2021Copper Contributor
Task ID and Predecessor with VBA
Hi, In a mpp file I have the tasks ID and predecessors of many tasks. I need to transmit them into another mpp file using VBA. The tasks are not listed in the same order. How can I do that ? Thank...
Miles_Goodchild
May 10, 2021Brass Contributor
I am not sure why you would want to do this however
1) If the tasks have something in common (name, Unique ID etc) which means that you know that Task 1 in the original file is is actually task 10 in the new file then you can use this information as a key in Excel and use a VLOOKUP; copy the data from the Original File into one set of columns and then copy the information from the new file into another set of columns and use VLOOKUP to transfer the data and then copy and paste back into MSP
2) Copying the tasks (i.e. the whole line) from one plan to another will take across all data including dependencies but I suspect this isn't what you're trying to do.
Maybe some more information about what you're trying to do will help people to come up with ideas?
HTH
Miles
1) If the tasks have something in common (name, Unique ID etc) which means that you know that Task 1 in the original file is is actually task 10 in the new file then you can use this information as a key in Excel and use a VLOOKUP; copy the data from the Original File into one set of columns and then copy the information from the new file into another set of columns and use VLOOKUP to transfer the data and then copy and paste back into MSP
2) Copying the tasks (i.e. the whole line) from one plan to another will take across all data including dependencies but I suspect this isn't what you're trying to do.
Maybe some more information about what you're trying to do will help people to come up with ideas?
HTH
Miles
Robert0842
May 11, 2021Copper Contributor
Hi,
Thanks for trying to help me.
I'll try to explain more accurately.
The user created a schedule: 1600 tasks and a WBS, and then he activated a grouping.
Now he wants the structure of the grouping as a new WBS.
The Copy and Paste works fine for most of the fields, but it doesn't work for the Predecessors column. For example, in the original file the predecessor of Task 3 was Task 2, but in the new file Task ID 2 is its own summary.
Any idea?
Thanks again
Thanks for trying to help me.
I'll try to explain more accurately.
The user created a schedule: 1600 tasks and a WBS, and then he activated a grouping.
Now he wants the structure of the grouping as a new WBS.
The Copy and Paste works fine for most of the fields, but it doesn't work for the Predecessors column. For example, in the original file the predecessor of Task 3 was Task 2, but in the new file Task ID 2 is its own summary.
Any idea?
Thanks again