Forum Discussion
LisaJanssen
Mar 14, 2024Copper Contributor
Timeline
Hi, I am new to using Microsoft Project. I have combined 2 projects into a master file. I would like to create a timeline, but I need to add the summary name to task. Both my projects have ...
- Mar 14, 2024LisaJanssen,
This should do it. Run it at master level and then close the master. You will get a couple of messages asking if you want to save changes. Answer "yes" to the first message and "yes to all" on the second message.
John
Sub AddProjToSubsAtMstrLevel()
Dim t As Task
Dim sp As Subproject
For Each t In ActiveProject.Tasks
t.Name = t.Project & " - " & t.Name
Next t
End Sub
LisaJanssen
Mar 14, 2024Copper Contributor
John-project , Thanks John, yes I would also like to see the Macro
John-project
Mar 14, 2024Silver Contributor
LisaJanssen,
This should do it. Run it at master level and then close the master. You will get a couple of messages asking if you want to save changes. Answer "yes" to the first message and "yes to all" on the second message.
John
Sub AddProjToSubsAtMstrLevel()
Dim t As Task
Dim sp As Subproject
For Each t In ActiveProject.Tasks
t.Name = t.Project & " - " & t.Name
Next t
End Sub
This should do it. Run it at master level and then close the master. You will get a couple of messages asking if you want to save changes. Answer "yes" to the first message and "yes to all" on the second message.
John
Sub AddProjToSubsAtMstrLevel()
Dim t As Task
Dim sp As Subproject
For Each t In ActiveProject.Tasks
t.Name = t.Project & " - " & t.Name
Next t
End Sub
- LisaJanssenMar 14, 2024Copper ContributorThanks for all the help John, it does not like this string
t.Name = t.Project & " - " & t.Name- John-projectMar 14, 2024Silver ContributorLisaJanssen,
Are you running the macro at master level?
When you get the error message, hit the "Debug button". Then hover you mouse over each of the arguments in the string. What do you see for each?
Could you post a screen shot of your master?
John- LisaJanssenMar 14, 2024Copper ContributorWoohoo, I do have it working.