Resource.Delete Method

Project Developer Reference

Deletes an object from its containing collection.



expression   A variable that represents a Resource object.


The Delete method does not apply to resource calendars.

The following example deletes every resource assignment in the active project.

Visual Basic for Applications
  Sub DeleteAssignments()
Dim RA As Assignment        ' Assignment object for resources
Dim T As Task               ' Task object

' Delete resource assignments.
For Each T in ActiveProject.Tasks
    For Each RA in T.Assignments
        RA.<strong class="bterm">Delete</strong>
    Next RA
Next T

End Sub

See Also