http://groups.google.com
But I have found it for you:
http://groups.google.com/groups?q="[email protected]&rnum=4
Here it is, posted Nov. 17th, 2004
This gets the values that exist in the text20 field and puts them into an
array.
I'm cutting and pasting from an old file, so I'm not 100% sure this is the
best version. I think it may end up with an extra value in the array, but
you can figure that out.
I usually call it from another subprocedure and then traverse the resulting
array.
------snip-----------
Private Sub MyArray()
Dim myTask As Task
Dim myTasks As Tasks
Dim Addme As Boolean
Dim myList As String
Set myTasks = ActiveProject.Tasks
ArrayIndex = 0
ReDim Preserve WorkType(ArrayIndex)
For Each myTask In myTasks
Addme = False
If Not myTask Is Nothing Then
If Not myTask.summary Then
If myTask.Text20 <> "" Then
Addme = True
'check if it is already in the array
For ArrayIndex = 0 To UBound(WorkType)
If myTask.Text20 = WorkType(ArrayIndex) Then
Addme = False
End If
Next ArrayIndex
End If
'if it is not in the array then expand the array and add the new value
If Addme = True And myTask.Text20 <> "" Then
WorkType(ArrayIndex - 1) = myTask.Text20
ReDim Preserve WorkType(ArrayIndex)
End If
End If
End If
Next myTask
End Sub
--
-Jack ... For project information and macro examples visit
http://masamiki.com/project
-
-Jack ... For project information and macro examples visit
http://masamiki.com/project
..