A
andy.novak
Is there a more efficient way to do below? A FIND statement or
something similar than looping through all assignments for a task to
see if an enterprise resource has been assigned already? Please give
example.
Thanks,
Andy Novak
UNT
ResMatch = 0
For Each assn In t.Assignments
If assn.ResourceName = res.Name
Then
ResMatch = ResMatch + 1
End If
Next assn
If ResMatch = 0 Then
t.Assignments.Add
ResourceID:=res.ID, Units:=0
End If
something similar than looping through all assignments for a task to
see if an enterprise resource has been assigned already? Please give
example.
Thanks,
Andy Novak
UNT
ResMatch = 0
For Each assn In t.Assignments
If assn.ResourceName = res.Name
Then
ResMatch = ResMatch + 1
End If
Next assn
If ResMatch = 0 Then
t.Assignments.Add
ResourceID:=res.ID, Units:=0
End If