H
Hans Flippo
Hello, everyone, I am trying to use the macro copied below, made by Jack
Dahlgren:
I would like to use TaskName in stead of Text12, so I changed Text12 to Name
in the macro.
After the macro has run, all tasknames start with 'ResPool'. Where is that
coming from, how can I avoid this 'ResPool' in the Task Name?
I am using Project 2000. On project level Share Resources is Off.
Thanks for your reply!
'This Macro will create the entire "Path"
'to a specific task by adding together the
'names of all the parent tasks. It is useful when
'you have many commonly named substasks and want to
'know where in the heirarchy they reside.
'As written, this places the "path" in the
'Text12 custom field. You could alternately put this into
'the task name field itself, however that may make the names
'rather long
'Copyright Jack Dahlgren, March 2002
Dim mystring As String
Dim mytask As Task
Dim myoutlinelevel As Integer
myoutlinelevel = 1
While myoutlinelevel < 10
For Each mytask In ActiveProject.Tasks
If Not (mytask Is Nothing) Then
If mytask.OutlineLevel = myoutlinelevel Then
mytask.Text12 = mytask.OutlineParent.Text12 & " | " & mytask.Name
End If
End If
Next mytask
myoutlinelevel = myoutlinelevel + 1
Wend
End Sub
Dahlgren:
I would like to use TaskName in stead of Text12, so I changed Text12 to Name
in the macro.
After the macro has run, all tasknames start with 'ResPool'. Where is that
coming from, how can I avoid this 'ResPool' in the Task Name?
I am using Project 2000. On project level Share Resources is Off.
Thanks for your reply!
'This Macro will create the entire "Path"
'to a specific task by adding together the
'names of all the parent tasks. It is useful when
'you have many commonly named substasks and want to
'know where in the heirarchy they reside.
'As written, this places the "path" in the
'Text12 custom field. You could alternately put this into
'the task name field itself, however that may make the names
'rather long
'Copyright Jack Dahlgren, March 2002
Dim mystring As String
Dim mytask As Task
Dim myoutlinelevel As Integer
myoutlinelevel = 1
While myoutlinelevel < 10
For Each mytask In ActiveProject.Tasks
If Not (mytask Is Nothing) Then
If mytask.OutlineLevel = myoutlinelevel Then
mytask.Text12 = mytask.OutlineParent.Text12 & " | " & mytask.Name
End If
End If
Next mytask
myoutlinelevel = myoutlinelevel + 1
Wend
End Sub