R
RC
Hello, can you advise on what is wrong with this? I am trying to
delete all payrates from Cost Rate Table B. I have 3 payrates to
delete.
Sub DeleteCRT_B()
Dim R As Resource
Dim CRT As CostRateTable
Dim PR As PayRate
For Each R In ActiveProject.Resources
Set CRT = R.CostRateTables("B")
If Not R Is Nothing Then
CRT.PayRates(1).Delete
CRT.PayRates(2).Delete
CRT.PayRates(3).Delete
End If
Next R
MsgBox "Complete"
End Sub
delete all payrates from Cost Rate Table B. I have 3 payrates to
delete.
Sub DeleteCRT_B()
Dim R As Resource
Dim CRT As CostRateTable
Dim PR As PayRate
For Each R In ActiveProject.Resources
Set CRT = R.CostRateTables("B")
If Not R Is Nothing Then
CRT.PayRates(1).Delete
CRT.PayRates(2).Delete
CRT.PayRates(3).Delete
End If
Next R
MsgBox "Complete"
End Sub