J
John
People,
In a private sub I am looping through the active project resources (see
following code snippet:
Private Sub SetBaseValues()
Dim tblltr as String
tblltr = "A"
For Each R In ActiveProject.Resources
If Not R Is Nothing Then
Set PR = R.CostRateTables(tblltr).PayRates
[rest of loop]
Next R
I get a runtime error 1004, "an unexpected error occurred with this
method" when the code tries to execute the "Set PR = ..." line. If I
change the tblltr variable to an interger, or if I insert "A" or 1 in
place of tblltr in the Set statement, the code runs fine.
According to VBA help, the index for the CostRateTables collection can
be either an index number or cost rate table name. Does anyone know why
I get the error?
John
In a private sub I am looping through the active project resources (see
following code snippet:
Private Sub SetBaseValues()
Dim tblltr as String
tblltr = "A"
For Each R In ActiveProject.Resources
If Not R Is Nothing Then
Set PR = R.CostRateTables(tblltr).PayRates
[rest of loop]
Next R
I get a runtime error 1004, "an unexpected error occurred with this
method" when the code tries to execute the "Set PR = ..." line. If I
change the tblltr variable to an interger, or if I insert "A" or 1 in
place of tblltr in the Set statement, the code runs fine.
According to VBA help, the index for the CostRateTables collection can
be either an index number or cost rate table name. Does anyone know why
I get the error?
John