I have a little problem with small chunk of code. I want the code to show me monthly expenditures:
Dim TSV As TimeScaleValue
Dim TSVS As TimeScaleValues
Set TSVS = ActiveProject.Tasks(63).TimeScaleData( _
For Each TSV In TSVS
Task(63) is actually a task that contains whole project and spans 22 months in this particular project. Yet the result in different projects are roughly the same: either one "0" or some cost that doesn't apply to the task. What's wrong with the code?
I wanted the program to give 22 values representing cost per month. I double-checked the task number, even referred to its name to be sure. Which leads to 2 other questions - is there a way to refer to a whole project instead of a task? And is the number (63 in this case) referring to unique Id? Sometimes program prompted me about "invalid argument" while clearly it wasn't.