Sanitizing sheet of resources while maintaining all other fields?

  • Thread starter Thread starter rogue844
  • Start date Start date
R

rogue844

Guest
Trying to delete resource names while keeping all other relevant data. When I use this, I get a 1101 error when I try to set T.ActualCost = TempAC. Can someone tell me what I'm missing? Thanks!


Sub DeleteResources()

Dim R As Assignment 'Assigned Resource
Dim T As Task ' Task
Dim TempD As Long
Dim TempAC As Double
Dim TempRC As Double
Dim TempC As Double


' Delete resource assignments.
For Each T In ActiveProject.Tasks
TempD = T.Duration
TempPC = T.PercentComplete
TempAC = T.ActualCost
TempRC = T.RemainingCost
TempC = T.Cost
For Each R In T.Assignments
R.Delete
Next R

T.Duration = TempD
T.PercentComplete = TempPC
T.ActualCost = TempAC
T.RemainingCost = TempRC
T.Cost = TempC
Next T

End Sub

Continue reading...
 
Back
Top