TimeScaleData, Project -> Excel

C

chris.the

Hello!

I am currently trying to import data from project to excel. So far no
problems. I am using the command

Set Kosten = Projekt.Resources(i).Assignments(z).TimeScaleData(start, ende,
12, 1)

The problem I have now is that he does not read the cumulative costs the
right way. It seems that the hourly rate in project has no effect on the data
I'll get in excel.
The data I can see in excel is allways calculated with an hourly rate of 60
and changing it in project does not help (The costs in project will be
changed, the data I get in excel remains the same).

Maybe someone can help me.

Kind regards,
Chris
 
R

Rod Gill

Does changing the rate in Project change the costs in the Resource Usage
View? If not, then you didn't change the rate for a resource assigned to
your tasks. The timescaledata method always returns what you see in the
usage view.
 
C

chris.the

Hi!

yes as I wrote if I change the hourly rate in project the costs in project
will be updated. So it updated in the usage view too.
But changing this rate has no effect on the data I'll get in excel.

If the hourly rate is 100 I'll get the same data in excel as if the hourly
rate is 1.
 
R

Rod Gill

I don't understand what's happening then. Timescaledata has always worked
perfectly for me. Can you rewrite the code using constants rather than
numbers to make sure you have the code right? I expect something like what's
below that always works for me:
Sub Test()
Dim R As Resource
Dim A As Assignment
Dim tsvs As TimeScaleValues
For Each R In ActiveProject.Resources
For Each A In R.Assignments
Set tsvs = A.TimeScaleData(ActiveProject.ProjectStart,
ActiveProject.ProjectFinish, pjAssignmentTimescaledCost, pjTimescaleWeeks)
'Copy to Excel
Next A
Next R
End Sub
 
C

chris.the

Hi,

finally I had time to get through your solution.

Somehow
pjAssignmentTimescaledCost (and the other pj...)
do not work in Excel while they do work in Project and I don't know why.

Maybe you have an idea?

Thanks,

kind regards,
Chris
 
J

Jan De Messemaeker

If your macro runs under Excel, did you, in Tools, References, set the
reference to trhe MS project library?
HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top