Assignment.Delete method (Project)

Deletes the Assignment object from an Assignments collection.

Syntax

expression.Delete

expression A variable that represents an Assignment object.

Example

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

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.Delete 
 Next RA 
 Next T 
 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.