ActiveProject.Tasks.Add
-
3 mai 2012 12:56
Hello,
what are correct parameters for add function? I want to add new task named XXX on 2nd position. But this code makes error:
Dim MT As Task
Set MT = ActiveProject.Tasks.Add(Name = "XXX", Before = 2)when I do not fill Before parameter, it works correctly but put tast on the end. How can I put task on selected position?
Toate mesajele
-
3 mai 2012 14:14
Hi There--
Please see if the below thread helps.
http://social.technet.microsoft.com/Forums/en-US/project2010custprog/thread/905e7780-8377-44f7-9d59-372119e0ba4aThanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
-
3 mai 2012 15:35Moderator
You are missing two colons.
Try this instead:
Dim MT As Task
Set MT = ActiveProject.Tasks.Add(Name:= "XXX", Before:= 2)If you are going to name your parameters you have to have a := not just a =
Brian Kennemer - Project MVP
DeltaBahn Senior Architect
endlessly obsessing about Project Server…so that you don’t have to.
Blog | Twitter | LinkedIn- Propus ca răspuns de Rod Gill MVPMVP, Moderator 3 mai 2012 21:13